Files
linux-stable-mirror/include/uapi/linux
Eric W. Biederman 336d4b814b ptrace: Move setting/clearing ptrace_message into ptrace_stop
Today ptrace_message is easy to overlook as it not a core part of
ptrace_stop.  It has been overlooked so much that there are places
that set ptrace_message and don't clear it, and places that never set
it.  So if you get an unlucky sequence of events the ptracer may be
able to read a ptrace_message that does not apply to the current
ptrace stop.

Move setting of ptrace_message into ptrace_stop so that it always gets
set before the stop, and always gets cleared after the stop.  This
prevents non-sense from being reported to userspace and makes
ptrace_message more visible in the ptrace helper functions so that
kernel developers can see it.

Link: https://lkml.kernel.org/r/87bky67qfv.fsf_-_@email.froward.int.ebiederm.org
Acked-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2022-03-18 09:44:19 -05:00
..
2021-09-14 08:46:08 +02:00
2021-11-01 13:36:08 +00:00
2021-10-29 12:38:43 +02:00
2021-11-26 16:48:59 +01:00
2021-10-07 13:51:11 +02:00
2021-10-06 12:05:51 +00:00
2021-11-15 07:53:10 -08:00
2021-12-02 12:07:04 +00:00
2021-10-26 14:58:45 +01:00
2021-10-14 23:06:28 +02:00
2021-10-18 17:20:50 +02:00
2021-09-16 14:36:26 +01:00