Skip to content

fix: linux 6.19 taint_flag.module removal - #2009

Open
the-rectifier wants to merge 2 commits into
volatilityfoundation:developfrom
the-rectifier:taints_issue_6.19
Open

fix: linux 6.19 taint_flag.module removal#2009
the-rectifier wants to merge 2 commits into
volatilityfoundation:developfrom
the-rectifier:taints_issue_6.19

Conversation

@the-rectifier

Copy link
Copy Markdown
Contributor

Linux 6.19 removed the taint_flag.module attribute: https://lore.kernel.org/all/20251022082938.26670-1-petr.pavlu@suse.com/T/#u

As such, when running linux.lsmod for a snapshot of linux 6.19+ the whole framework backtraces:

  File "/usr/lib/python3.14/site-packages/volatility3/framework/symbols/linux/utilities/tainting.py", line 94, in _module_flags_taint_post_4_10_rc1
    if is_module and not taint_flag.module:
                         ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/volatility3/framework/objects/__init__.py", line 993, in __getattr__
    raise AttributeError(
        f"{agg_name} has no attribute: {self.vol.type_name}.{attr}"
    )
AttributeError: StructType has no attribute: symbol_table_name1!taint_flag.module

Also, update the taint table, and introduce a new taint flag J:
https://docs.kernel.org/admin-guide/tainted-kernels.html#table-for-decoding-tainted-state

Taints continue to appear when running linux.lsmod on a random snapshot:

Volatility 3 Framework 2.28.2
Progress:  100.00               Stacking attempts finished
Offset  Module Name     Code Size       Taints  Load Arguments  File Output
[...]
0xffffc06e6bc0  vboxsf  0x17000 OOT_MODULE,UNSIGNED_MODULE      follow_symlinks=None, disabled=None     N/A
[...]
0xffffc031b040  vboxguest       0x81000 OOT_MODULE,UNSIGNED_MODULE      r3_log_to_host=None, log_dest=None, log_flags=None, log=None, disabled=None     N/A

):
if is_module and not taint_flag.module:
# https://lore.kernel.org/all/20251022082938.26670-1-petr.pavlu@suse.com/T/#u: "taint/module: Remove unnecessary taint_flag.module field"
if is_module and taint_flag.has_member("module") and not taint_flag.module:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this flag lots of false positives now, or was the taint_flag.module just a belt and braces check to reduce a few rare false positives?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my limited understanding, and based on the lore message, no, it shouldn't produce false positives.

The commit message claims that the per-module flags are always those added to module.taints by calls to add_taint_module().

Cross-checking those calls, they (8) exist inside the following:

Along with a single direct set_bit() in inherit_taint()

The only flags that can reach mod->taints are P F O C E K N all of them already had the .module = true;

Actually, the error ran the other way around; the flags T and J were marked as per-module by mistake, which prompted the removal

@the-rectifier

Copy link
Copy Markdown
Contributor Author

While we're at it, fix RANDSTRUCT as well

Silly me, marked FWCTL as a per-module... 🤡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants