Skip to content

Commit 7371281

Browse files
committed
Fix parsing corefile with missing auxv
Closes #2543
1 parent b2345f2 commit 7371281

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pwnlib/elf/corefile.py

+5
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ def __init__(self, *a, **kw):
555555
# Pointer to the entry point
556556
self.at_entry = 0
557557

558+
# Pointer to the vdso
559+
self.at_sysinfo_ehdr = None
560+
558561
try:
559562
super(Corefile, self).__init__(*a, **kw)
560563
except IOError:
@@ -611,6 +614,8 @@ def __init__(self, *a, **kw):
611614

612615
if not self.stack and self.mappings:
613616
self.stack = self.mappings[-1].stop
617+
if self.mappings[-1].start == 0xffffffffff600000 and len(self.mappings) > 1:
618+
self.stack = self.mappings[-2].stop
614619

615620
if self.stack and self.mappings:
616621
for mapping in self.mappings:

0 commit comments

Comments
 (0)