Skip to content

Commit aeb4c26

Browse files
authored
Fix parsing corefile with missing auxv (#2559)
Closes #2543
1 parent b2345f2 commit aeb4c26

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,17 @@ The table below shows which release corresponds to each branch, and what date th
112112
[2476]: https://github.com/Gallopsled/pwntools/pull/2476
113113
[2364]: https://github.com/Gallopsled/pwntools/pull/2364
114114

115-
## 4.14.1
115+
## 4.14.1 (`stable`)
116116

117117
- [#2533][2533] Fix installation on Python 3.5 and lower
118118
- [#2518][2518] fix: update apport coredump path handling for CorefileFinder
119+
- [#2559][2559] Fix parsing corefile with missing auxv
119120

120121
[2533]: https://github.com/Gallopsled/pwntools/pull/2533
121122
[2518]: https://github.com/Gallopsled/pwntools/pull/2518
123+
[2559]: https://github.com/Gallopsled/pwntools/pull/2559
122124

123-
## 4.14.0 (`stable`)
125+
## 4.14.0
124126

125127
- [#2356][2356] Add local libc database provider for libcdb
126128
- [#2360][2360] Add offline parameter for `search_by_hash` series function

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)