Merge pull request #1670 from volatilityfoundation/fix_module_enum

Avoid smear in module enumeration paths
This commit is contained in:
ikelos
2025-03-05 23:43:34 +00:00
committed by GitHub
2 changed files with 13 additions and 3 deletions
@@ -65,7 +65,11 @@ class Check_modules(plugins.PluginInterface):
mod = mod_kobj.mod
name = utility.pointer_to_string(kobj.name, 32)
try:
name = utility.pointer_to_string(kobj.name, 32)
except exceptions.InvalidAddressException:
continue
if kobj.name and kobj.reference_count() > 2:
ret[name] = mod
@@ -93,8 +93,14 @@ class Tainting(interfaces.configuration.VersionableInterface):
):
if is_module and not taint_flag.module:
continue
c_true = chr(taint_flag.c_true)
c_false = chr(taint_flag.c_false)
try:
c_true = chr(taint_flag.c_true)
c_false = chr(taint_flag.c_false)
except ValueError:
# thrown when the c_true or c_false values are out of range
continue
if taints & (1 << taint_bit):
taints_string += c_true
elif c_false != " ":