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

Commit a767173

Browse files
committed
Mac - check file header address and dyld info address before processing them
1 parent abd18c8 commit a767173

File tree

1 file changed

+4
-0
lines changed
  • volatility/plugins/overlays/mac

1 file changed

+4
-0
lines changed

volatility/plugins/overlays/mac/mac.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,8 @@ def get_macho(self, exe_address):
10611061
proc_as = self.get_process_address_space()
10621062

10631063
m = obj.Object("macho_header", offset = exe_address, vm = proc_as)
1064+
if not m.is_valid():
1065+
return
10641066

10651067
buffer = ""
10661068

@@ -1117,6 +1119,8 @@ def get_dyld_maps(self):
11171119
return
11181120

11191121
info_addr = struct.unpack(self.pack_fmt, info_buf)[0]
1122+
if not proc_as.is_valid_address(info_addr):
1123+
return
11201124

11211125
cnt = infos.infoArrayCount
11221126
if cnt > 4096:

0 commit comments

Comments
 (0)