summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2017-05-22 15:40:12 -0500
committerBen Hutchings <ben@decadent.org.uk>2018-01-01 20:52:11 +0000
commit7dd8d19f44c65eb1567685ab8b0fe06d7cb584fc (patch)
tree5935885c1bcb0799a269164954d71ec67810b035 /include/trace
parentaa3fbddbb80119b4cffbb45581c8542d9dcdec79 (diff)
ptrace: Properly initialize ptracer_cred on fork
commit c70d9d809fdeecedb96972457ee45c49a232d97f upstream. When I introduced ptracer_cred I failed to consider the weirdness of fork where the task_struct copies the old value by default. This winds up leaving ptracer_cred set even when a process forks and the child process does not wind up being ptraced. Because ptracer_cred is not set on non-ptraced processes whose parents were ptraced this has broken the ability of the enlightenment window manager to start setuid children. Fix this by properly initializing ptracer_cred in ptrace_init_task This must be done with a little bit of care to preserve the current value of ptracer_cred when ptrace carries through fork. Re-reading the ptracer_cred from the ptracing process at this point is inconsistent with how PT_PTRACE_CAP has been maintained all of these years. Tested-by: Takashi Iwai <tiwai@suse.de> Fixes: 64b875f7ac8a ("ptrace: Capture the ptracer's creds not PT_PTRACE_CAP") Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions