mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 04:37:38 +02:00
Merge pull request #1490 from volatilityfoundation/issue_1482_infinite_loop_oom
Prevent infinite looping and out of memory errors #1482
This commit is contained in:
@@ -341,7 +341,7 @@ class Handles(interfaces.plugins.PluginInterface):
|
||||
try:
|
||||
obj_name = entry.NameInfo.Name.String
|
||||
except (ValueError, exceptions.InvalidAddressException):
|
||||
obj_name = ""
|
||||
obj_name = None
|
||||
|
||||
except exceptions.InvalidAddressException:
|
||||
vollog.log(
|
||||
@@ -359,7 +359,7 @@ class Handles(interfaces.plugins.PluginInterface):
|
||||
format_hints.Hex(entry.HandleValue),
|
||||
obj_type,
|
||||
format_hints.Hex(entry.GrantedAccess),
|
||||
obj_name,
|
||||
obj_name or renderers.NotAvailableValue(),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -133,8 +133,17 @@ class CM_KEY_BODY(objects.StructType):
|
||||
|
||||
def get_full_key_name(self) -> str:
|
||||
output = []
|
||||
seen = set()
|
||||
|
||||
kcb = self.KeyControlBlock
|
||||
while kcb.ParentKcb:
|
||||
if kcb.ParentKcb.vol.offset in seen:
|
||||
return None
|
||||
seen.add(kcb.ParentKcb.vol.offset)
|
||||
|
||||
if len(output) > 128:
|
||||
return None
|
||||
|
||||
if kcb.NameBlock.Name is None:
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user