]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/landlock: Test SCOPE_SIGNAL on the SIGIO/fowner pgid path
authorBryam Vargas <hexlabsecurity@proton.me>
Thu, 4 Jun 2026 23:17:05 +0000 (23:17 +0000)
committerMickaël Salaün <mic@digikod.net>
Sat, 13 Jun 2026 21:15:00 +0000 (23:15 +0200)
commit76579d09beedaffe7fe76e9c05644f73983e1ceb
tree7a4dd1c51147e8d7763a71ebb01520e324277346
parent4b80320ca7ed03d6e683f95b6066565dc97b9f92
selftests/landlock: Test SCOPE_SIGNAL on the SIGIO/fowner pgid path

Add regression tests for the LANDLOCK_SCOPE_SIGNAL handling of the
asynchronous SIGIO delivery path (fcntl(F_SETOWN)) with a process-group
owner.

sigio_to_pgid_members covers the bypass: a sandboxed process at the head
of its process group's PGID hlist (the default after fork()) arms
F_SETOWN(-pgrp) + O_ASYNC and triggers the fan-out; the in-domain owner
must be signaled (proving the trigger fired) while the non-sandboxed
member of the group, outside the domain, must not.

sigio_to_pgid_self covers the same-process guarantee: the owner is
registered from a sandboxed non-leader thread, whose domain differs from
the thread-group leader the kernel signals for a process-group owner.
That leader belongs to the owner's own process and must still be
signaled.

Without the fix the first test sees the out-of-domain member signaled
and the second sees the owner's own leader denied.

Cc: stable@vger.kernel.org
Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://patch.msgid.link/43370e89f7a896a583bf33d1cd171d02630e61bf.1780614610.git.hexlabsecurity@proton.me
[mic: Fix comment]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/scoped_signal_test.c