[sudo-commits] sudo changeset 13970:bf9a482ecddd

Todd C. Miller Todd.Miller at sudo.ws
Wed May 18 07:51:39 MDT 2022


changeset:	13970:bf9a482ecddd in /raid/repos/sudo
details:	https://www.sudo.ws/repos/sudo/rev/bf9a482ecddd
user:		Todd C. Miller <Todd.Miller at sudo.ws>
date:		Tue May 17 14:26:03 2022 -0600

Log Message:
	Fix suspending a sudo-run shell in ptrace intercept mode with no pty.
	When ptracing a process, we receive the signal-delivery-stop signal
	before the group-stop signal.  If sudo is running the command in
	the same terminal, we need to wait until the stop signal is actually
	delivered to the command before we can suspend sudo itself.  If we
	suspend sudo before receiving the group-stop, the command will be
	restarted with PTRACE_LISTEN too late and will miss the SIGCONT
	from sudo.

diffstat:

 src/exec_nopty.c                    |   4 ++--
 src/exec_ptrace.c                   |  26 +++++++++++++-------------
 src/exec_pty.c                      |   2 +-
 src/regress/intercept/test_ptrace.c |   8 +++++++-
 src/sudo_exec.h                     |   2 +-
 5 files changed, 24 insertions(+), 18 deletions(-)



More information about the sudo-commits mailing list