Bring hidden module to expose dump option. Fix CodeQL found bug

This commit is contained in:
Andrew Case
2025-03-26 01:30:26 +00:00
parent e93df37649
commit 25eaaff06c
2 changed files with 8 additions and 2 deletions
@@ -19,7 +19,7 @@ class Hidden_modules(plugins.PluginInterface):
"""Carves memory to find hidden kernel modules"""
_required_framework_version = (2, 10, 0)
_version = (3, 0, 0)
_version = (3, 0, 1)
@classmethod
def get_hidden_modules(
@@ -72,6 +72,12 @@ class Hidden_modules(plugins.PluginInterface):
component=linux_utilities_modules.ModuleDisplayPlugin,
version=(1, 0, 0),
),
requirements.BooleanRequirement(
name="dump",
description="Extract listed modules",
default=False,
optional=True,
),
]
@staticmethod
@@ -782,7 +782,7 @@ class ModuleExtract(interfaces.configuration.VersionableInterface):
hasattr(module.sect_attrs, "nsections")
except exceptions.InvalidAddressException:
vollog.debug(f"module at offset {module.vol.offset:#x} is paged out.")
return
return None
# Gather sections
updated_sections, strtab_index, symtab_index = cls._parse_sections(