Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit 57c69e5

Browse files
committed
Linux - skip smeared vm_area_struct instances
1 parent 343753c commit 57c69e5

File tree

1 file changed

+21
-1
lines changed
  • volatility/plugins/overlays/linux

1 file changed

+21
-1
lines changed

volatility/plugins/overlays/linux/linux.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,23 @@ def is_valid(self):
10801080
return valid
10811081

10821082
class vm_area_struct(obj.CType):
1083+
def is_valid(self):
1084+
start = self.vm_start.v()
1085+
end = self.vm_end.v()
1086+
pgoff = self.vm_pgoff.v()
1087+
1088+
valid = True
1089+
1090+
if (start > end) or \
1091+
(end - start > 100000000000) or \
1092+
(start > 0xff00000000000000) or \
1093+
(end > 0xff00000000000000) or \
1094+
(pgoff > 100000000000):
1095+
1096+
valid = False
1097+
1098+
return valid
1099+
10831100
def vm_name(self, task):
10841101
if self.vm_file:
10851102
fname = linux_common.get_path(task, self.vm_file)
@@ -1922,7 +1939,10 @@ def get_proc_maps(self):
19221939
val = vma.v()
19231940
if val in seen:
19241941
break
1925-
1942+
1943+
if not vma.is_valid():
1944+
break
1945+
19261946
yield vma
19271947

19281948
seen[val] = 1

0 commit comments

Comments
 (0)