Skip to content

Commit db98e5e

Browse files
authored
Don't go through a shell in gdb.debug (#2378)
* Don't go though a shell in `gdb.debug` gdbserver starts a shell and runs the target process through it. This behavior was added in gdbserver 8.0 together with the commandline flag --no-startup-with-shell to disable it. * Update CHANGELOG
1 parent 6007248 commit db98e5e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The table below shows which release corresponds to each branch, and what date th
1111
| ---------------- | -------- | ---------------------- |
1212
| [4.14.0](#4140-dev) | `dev` |
1313
| [4.13.0](#4130-beta) | `beta` |
14+
| [4.12.1](#4121) | |
1415
| [4.12.0](#4120-stable) | `stable` | Feb 22, 2024
1516
| [4.11.1](#4111) | | Nov 14, 2023
1617
| [4.11.0](#4110) | | Sep 15, 2023
@@ -130,9 +131,12 @@ The table below shows which release corresponds to each branch, and what date th
130131
[2233]: https://github.com/Gallopsled/pwntools/pull/2233
131132

132133
## 4.12.1
134+
133135
- [#2373][2373] Fix displaying bright color variation in terminal output
136+
- [#2378][2378] Don't go though a shell in `gdb.debug`
134137

135138
[2373]: https://github.com/Gallopsled/pwntools/pull/2373
139+
[2378]: https://github.com/Gallopsled/pwntools/pull/2378
136140

137141
## 4.12.0 (`stable`)
138142

pwnlib/gdb.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def _gdbserver_args(pid=None, path=None, args=None, which=None, env=None):
287287

288288
orig_args = args
289289

290-
gdbserver_args = [gdbserver, '--multi']
290+
# --no-startup-with-shell is required for forking shells like SHELL=/bin/fish
291+
# https://github.com/Gallopsled/pwntools/issues/2377
292+
gdbserver_args = [gdbserver, '--multi', '--no-startup-with-shell']
291293
if context.aslr:
292294
gdbserver_args += ['--no-disable-randomization']
293295
else:

0 commit comments

Comments
 (0)