Skip to content

Commit 2f58fe7

Browse files
committed
Merge branch 'stable' into beta
2 parents 8cf3ecd + 64d52b0 commit 2f58fe7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ The table below shows which release corresponds to each branch, and what date th
9494
- [#2271][2271] FIX: Generated shebang with path to python invalid if path contains spaces
9595
- [#2272][2272] Fix `tube.clean_and_log` not logging buffered data
9696
- [#2281][2281] FIX: Getting right amount of data for search fix
97+
- [#2294][2294] Fix atexit SEGV in aarch64 loader
9798

9899
[2271]: https://github.com/Gallopsled/pwntools/pull/2271
99100
[2272]: https://github.com/Gallopsled/pwntools/pull/2272
100101
[2281]: https://github.com/Gallopsled/pwntools/pull/2281
102+
[2294]: https://github.com/Gallopsled/pwntools/pull/2294
101103

102104
## 4.11.0
103105

pwnlib/shellcraft/templates/aarch64/linux/loader.asm

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ PT_LOAD = 1
107107
mov x3, sp
108108
stp x2, x3, [sp, #-16]!
109109

110-
/* argc, argv[0], argv[1], envp */
110+
/* argc, argv[0], argv[1], envp; x0 must be zero! */
111111
/* ideally these could all be empty, but unfortunately
112112
we have to keep the stack aligned. it's easier to
113113
just push an extra argument than care... */
114114
stp x0, x1, [sp, #-16]! /* argv[1] = NULL, envp = NULL */
115-
mov x0, 1
116-
mov x1, sp
117-
stp x0, x1, [sp, #-16]! /* argc = 1, argv[0] = "" */
115+
mov x2, 1
116+
mov x3, sp
117+
stp x2, x3, [sp, #-16]! /* argc = 1, argv[0] = "" */
118118

119119
br x8
120120

0 commit comments

Comments
 (0)