useful Yama EPERM error message missing (regression)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb (Ubuntu) |
Fix Released
|
Undecided
|
Marc Deslauriers | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Marc Deslauriers | ||
ltrace (Ubuntu) |
Fix Released
|
Undecided
|
Marc Deslauriers | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Marc Deslauriers |
Bug Description
SRU:
[Impact]
ltrace and gdb users may be stumped by the ptrace restrictions that are enabled by default in Ubuntu. Unfortunately, the patches that print a detailed informative error message in previous Ubuntu releases no longer work or haven't been applied in Trusty.
[Test Case]
$ ltrace -p 1 should display the following:
Cannot attach to pid 1: Operation not permitted
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/
again as the root user. For more details, see /etc/sysctl.
$ gdb -p 1 should display a similar error message
[Regression Potential]
This patch is in the error condition, so regression is unlikely. Worst case, it could prevent ltrace or gdb from working at all.
Original description:
Trusty's gdb and ltrace have lost the helpful error details when ptrace attach fails. Compare to strace:
$ strace -p 1
strace: attach: ptrace(
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/
again as the root user. For more details, see /etc/sysctl.
$ gdb -p 1
GNU gdb (Ubuntu 7.7-0ubuntu3) 7.7
...
Attaching to process 1
ptrace: Operation not permitted.
$ ltrace -p 1
Cannot attach to pid 1: Operation not permitted
In Precise ltrace has the correct error (though gdb is still missing it -- this was lost quite some time ago it seems):
$ ltrace -p 1
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/
again as the root user. For more details, see /etc/sysctl.
Cannot attach to pid 1: Operation not permitted
Changed in ltrace (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in ltrace (Ubuntu Utopic): | |
status: | New → Confirmed |
assignee: | nobody → Marc Deslauriers (mdeslaur) |
Changed in gdb (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in gdb (Ubuntu Utopic): | |
status: | New → Confirmed |
Changed in gdb (Ubuntu Utopic): | |
assignee: | nobody → Marc Deslauriers (mdeslaur) |
description: | updated |
Changed in gdb (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
Changed in ltrace (Ubuntu Trusty): | |
status: | Confirmed → In Progress |
This bug was fixed in the package ltrace - 0.7.3-4ubuntu6
---------------
ltrace (0.7.3-4ubuntu6) utopic; urgency=medium
* debian/ptrace.diff: updated to restore PTRACE scope sysctl warning
(LP: #1317136)
-- Marc Deslauriers <email address hidden> Wed, 07 May 2014 15:32:12 -0400