]> git.ipfire.org Git - thirdparty/linux.git/commit
landlock: Allow TSYNC with LOG_SUBDOMAINS_OFF and fd=-1
authorMickaël Salaün <mic@digikod.net>
Tue, 7 Apr 2026 16:41:05 +0000 (18:41 +0200)
committerMickaël Salaün <mic@digikod.net>
Tue, 7 Apr 2026 16:51:00 +0000 (18:51 +0200)
commite75e38055b9df5eafd663c6db00e634f534dc426
treeb4f2f5a925987bec20932f073d12f752a9c6ab07
parent874c8f83826c95c62c21d9edfe9ef43e5c346724
landlock: Allow TSYNC with LOG_SUBDOMAINS_OFF and fd=-1

LANDLOCK_RESTRICT_SELF_TSYNC does not allow
LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF with ruleset_fd=-1, preventing
a multithreaded process from atomically propagating subdomain log muting
to all threads without creating a domain layer.  Relax the fd=-1
condition to accept TSYNC alongside LOG_SUBDOMAINS_OFF, and update the
documentation accordingly.

Add flag validation tests for all TSYNC combinations with ruleset_fd=-1,
and audit tests verifying both transition directions: muting via TSYNC
(logged to not logged) and override via TSYNC (not logged to logged).

Cc: Günther Noack <gnoack@google.com>
Cc: stable@vger.kernel.org
Fixes: 42fc7e6543f6 ("landlock: Multithreading support for landlock_restrict_self()")
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260407164107.2012589-2-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
include/uapi/linux/landlock.h
security/landlock/syscalls.c
tools/testing/selftests/landlock/audit_test.c
tools/testing/selftests/landlock/tsync_test.c