mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-06 01:37:39 +02:00
Add smear checks and missing absolute flag to walk_internal_list
This commit is contained in:
@@ -430,13 +430,36 @@ class LinuxUtilities(interfaces.configuration.VersionableInterface):
|
||||
|
||||
@classmethod
|
||||
def walk_internal_list(cls, vmlinux, struct_name, list_member, list_start):
|
||||
count = 0
|
||||
seen = set()
|
||||
|
||||
while list_start:
|
||||
if list_start.vol.offset in seen:
|
||||
vollog.debug(
|
||||
"walk_internal_list: Repeat entry found. Stopping enumeration"
|
||||
)
|
||||
break
|
||||
seen.add(list_start.vol.offset)
|
||||
|
||||
if not (list_start and list_start.is_readable()):
|
||||
break
|
||||
|
||||
list_struct = vmlinux.object(
|
||||
object_type=struct_name, offset=list_start.vol.offset
|
||||
object_type=struct_name, offset=list_start.vol.offset, absolute=True
|
||||
)
|
||||
|
||||
yield list_struct
|
||||
|
||||
list_start = getattr(list_struct, list_member)
|
||||
|
||||
if count == 4096:
|
||||
vollog.debug(
|
||||
f"walk_internal_list: Breaking list enumeration at {count}"
|
||||
)
|
||||
break
|
||||
|
||||
count += 1
|
||||
|
||||
@classmethod
|
||||
def container_of(
|
||||
cls,
|
||||
|
||||
Reference in New Issue
Block a user