Skip to content

Symbols: skip tables without producer in verify_table_versions - #2061

Open
cristianchiriac wants to merge 1 commit into
volatilityfoundation:developfrom
cristianchiriac:fix-verify-table-versions-native-table
Open

cristianchiriac wants to merge 1 commit into
volatilityfoundation:developfrom
cristianchiriac:fix-verify-table-versions-native-table

Conversation

@cristianchiriac

Copy link
Copy Markdown
Contributor

Fixes #2058.

VmwareLayer appends a NativeTable("vmware", ...) to the symbol space. NativeTable has no producer attribute, so SymbolSpace.verify_table_versions raised AttributeError: 'NativeTable' object has no attribute 'producer' on table.producer, before the existing "no producer metadata" branch could skip it. Any plugin that checks the default table list, such as linux.kmsg.Kmsg, failed on every VMware image.

The method now reads the attribute with getattr(table, "producer", None), so tables without one take the existing skip branch.

test/test_symbol_space.py adds a NativeTable to a fresh context's symbol space and calls verify_table_versions with a validator that always fails. Without the change it raises the AttributeError from the issue; with it the native table is skipped and the call returns True.

pytest test/test_symbol_space.py test/test_linux_socket_addresses.py --volatility=vol.py
25 passed

ruff check and ruff format --check pass on both files. As far as I can see, the test workflow only runs test/plugins, so this file (like test_linux_socket_addresses.py) only runs locally.

VmwareLayer adds a NativeTable to the symbol space, and NativeTable has
no producer attribute, so verify_table_versions raised AttributeError
before reaching the existing 'no producer metadata' branch. Plugins that
check the default table list, such as linux.kmsg, failed on every VMware
image.

Fixes volatilityfoundation#2058
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.

linux.kmsg fails on VMware images: verify_table_versions reads producer from native symbol tables

1 participant