Skip to content

Commit e52aea8

Browse files
committed
Fix checks in thrdscan that broke tests
1 parent 2ebda44 commit e52aea8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

volatility3/framework/plugins/windows/thrdscan.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,19 @@ def gather_thread_info(
110110
vollog.debug(f"Thread invalid address {ethread.vol.offset:#x}")
111111
return None
112112

113+
if owner_proc_pid == 4 or owner_proc.InheritedFromUniqueProcessId == 4:
114+
vollog.debug(
115+
f"Skipping kernel process with pid {owner_proc.InheritedFromUniqueProcessId}"
116+
)
117+
return None
118+
113119
if vads_cache is not None:
114120
vads = pe_symbols.PESymbols.get_vads_for_process_cache(
115121
vads_cache, owner_proc
116122
)
117-
# no vads = terminated/smeared, pid 4 = kernel = don't check VADs
118-
if (
119-
owner_proc_pid != 4
120-
and owner_proc.InheritedFromUniqueProcessId != 4
121-
and (not vads or len(vads) < 5)
122-
):
123+
if not vads or len(vads) < 5:
123124
vollog.debug(
124-
f"No vads for process at {owner_proc.vol.offset:#x}. Skipping thread at {ethread.vol.offset:#x}"
125+
f"Not enough vads for process at {owner_proc.vol.offset:#x}. Skipping thread at {ethread.vol.offset:#x}"
125126
)
126127
return None
127128

0 commit comments

Comments
 (0)