Skip to content
Snippets Groups Projects
Unverified Commit 556a888a authored by Jann Horn's avatar Jann Horn Committed by Christian Brauner
Browse files

signal: don't silently convert SI_USER signals to non-current pidfd


The current sys_pidfd_send_signal() silently turns signals with explicit
SI_USER context that are sent to non-current tasks into signals with
kernel-generated siginfo.
This is unlike do_rt_sigqueueinfo(), which returns -EPERM in this case.
If a user actually wants to send a signal with kernel-provided siginfo,
they can do that with pidfd_send_signal(pidfd, sig, NULL, 0); so allowing
this case is unnecessary.

Instead of silently replacing the siginfo, just bail out with an error;
this is consistent with other interfaces and avoids special-casing behavior
based on security checks.

Fixes: 3eb39f47 ("signal: add pidfd_send_signal() syscall")
Signed-off-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
parent 79a3aaa7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment