From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Bradley Morgan <include@grrlz.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] signal: change sys_kill() to use SEND_SIG_NOINFO
Date: Fri, 26 Jun 2026 09:36:03 -0700 [thread overview]
Message-ID: <20260626093603.7eb06a58684e0d02f3b9d0f8@linux-foundation.org> (raw)
In-Reply-To: <aj6btAZqYuv59a8w@redhat.com>
On Fri, 26 Jun 2026 17:33:08 +0200 Oleg Nesterov <oleg@redhat.com> wrote:
> prepare_kill_siginfo(PIDTYPE_TGID) fills si_code = SI_USER and sets
> si_pid/si_uid in the sender's namespace. Then send_signal_locked()
> translates si_pid/si_uid to the target's namespace.
>
> SEND_SIG_NOINFO produces the same result: si_code = SI_USER, and
> __send_signal_locked() computes si_pid/si_uid directly in the target's
> namespace. The force computation is also the same: both check if the
> sender is visible in the target's pid namespace.
The above paragraphs contain no description of any flaw. What's wrong
here?
> Note: this also fixes the kill(-1, sig) case where send_signal_locked()
> rewrites si_pid/si_uid in the shared siginfo, corrupting it for subsequent
> recipients. But for other group senders like __kill_pgrp_info() we still
> need the fix from Bradley Morgan [1] who found this problem.
"also fixes". Again, what was the first fix?
> TODO: kill prepare_kill_siginfo() and change other users to use
> SEND_SIG_NOINFO too. This needs trivial changes in __send_signal_locked()
> and TP_STORE_SIGINFO().
>
> ...
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -3966,11 +3966,7 @@ static void prepare_kill_siginfo(int sig, struct kernel_siginfo *info,
> */
> SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
> {
> - struct kernel_siginfo info;
> -
> - prepare_kill_siginfo(sig, &info, PIDTYPE_TGID);
> -
> - return kill_something_info(sig, &info, pid);
> + return kill_something_info(sig, SEND_SIG_NOINFO, pid);
> }
Thanks, I'll queue this for testing. Please send along some changelog
edits sometime?
next prev parent reply other threads:[~2026-06-26 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 15:33 Oleg Nesterov
2026-06-26 16:36 ` Andrew Morton [this message]
2026-06-26 16:49 ` Bradley Morgan
2026-06-28 17:51 ` Oleg Nesterov
2026-06-28 18:01 ` Bradley Morgan
2026-06-28 18:19 ` Oleg Nesterov
2026-06-28 19:17 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260626093603.7eb06a58684e0d02f3b9d0f8@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=include@grrlz.net \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®