agent-ptrace regression test failing in Ubuntu 22.04
Chris Rapier
rapier at psc.edu
Thu Oct 27 02:26:38 AEDT 2022
I'm having the agent-ptrace consistently fail under Ubuntu 22.04. This
is under a pristine Ubuntu 22.04 VM. If I set the envar SUDO=sudo I get:
make[1]: Entering directory '/home/parallels/openssh-portable/regress'
run test agent-ptrace.sh ...
ptrace succeeded?: exit code 1
failed disallow agent ptrace attach
The contents of gdb.out are:
GNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/parallels/openssh-portable/ssh-agent...
Attaching to program: /home/parallels/openssh-portable/ssh-agent,
process 54674
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Inappropriate ioctl for device.
/home/parallels/openssh-portable/regress/54674: No such file or directory.
(gdb)
I don't know if GDB changed their wording but it certainly seems like
the test should pass. If I update the egrep then it does pass but I'm
not sure if that's legit. Anyway, I used the following:
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index feef5241..e5e5d32f 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -54,7 +54,7 @@ EOF
if [ $r -ne 0 ]; then
fail "gdb failed: exit code $r"
fi
- egrep 'ptrace: Operation not permitted.|procfs:.*Permission
denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable
to access task ' >/dev/null ${OBJ}/gdb.out
+ egrep 'ptrace: Operation not permitted.|procfs:.*Permission
denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable
to access task |Could not attach to process.' >/dev/null ${OBJ}/gdb.out
r=$?
rm -f ${OBJ}/gdb.out
if [ $r -ne 0 ]; then
Chris
More information about the openssh-unix-dev
mailing list