diff options
| author | Samasth Norway Ananda <samasth.norway.ananda@oracle.com> | 2026-01-27 19:18:11 -0800 |
|---|---|---|
| committer | Mickaël Salaün <mic@digikod.net> | 2026-02-06 17:54:43 +0100 |
| commit | fe72ce6710cba088b67e3279de87d7341fafc357 (patch) | |
| tree | 2f9e307b6177857a2ba83374cdece39ed302edbf /security | |
| parent | 6100f2904e0ea1f2c832ab6e93573fae47d3b13e (diff) | |
landlock: Add errata documentation section
Add errata section with code examples for querying errata and a warning
that most applications should not check errata. Use kernel-doc directives
to include errata descriptions from the header files instead of manual
links.
Also enhance existing DOC sections in security/landlock/errata/abi-*.h
files with Impact sections, and update the code comment in syscalls.c
to remind developers to update errata documentation when applicable.
This addresses the gap where the kernel implements errata tracking
but provides no user-facing documentation on how to use it, while
improving the existing technical documentation in-place rather than
duplicating it.
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260128031814.2945394-3-samasth.norway.ananda@oracle.com
[mic: Cosmetic fix]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'security')
| -rw-r--r-- | security/landlock/errata/abi-1.h | 8 | ||||
| -rw-r--r-- | security/landlock/errata/abi-4.h | 7 | ||||
| -rw-r--r-- | security/landlock/errata/abi-6.h | 10 | ||||
| -rw-r--r-- | security/landlock/syscalls.c | 4 |
4 files changed, 28 insertions, 1 deletions
diff --git a/security/landlock/errata/abi-1.h b/security/landlock/errata/abi-1.h index e8a2bff2e5b6..3f099555f059 100644 --- a/security/landlock/errata/abi-1.h +++ b/security/landlock/errata/abi-1.h @@ -12,5 +12,13 @@ * hierarchy down to its filesystem root and those from the related mount point * hierarchy. This prevents access right widening through rename or link * actions. + * + * Impact: + * + * Without this fix, it was possible to widen access rights through rename or + * link actions involving disconnected directories, potentially bypassing + * ``LANDLOCK_ACCESS_FS_REFER`` restrictions. This could allow privilege + * escalation in complex mount scenarios where directories become disconnected + * from their original mount points. */ LANDLOCK_ERRATUM(3) diff --git a/security/landlock/errata/abi-4.h b/security/landlock/errata/abi-4.h index c052ee54f89f..fe11ec7d7ddf 100644 --- a/security/landlock/errata/abi-4.h +++ b/security/landlock/errata/abi-4.h @@ -11,5 +11,12 @@ * :manpage:`bind(2)` and :manpage:`connect(2)` operations. This change ensures * that only TCP sockets are subject to TCP access rights, allowing other * protocols to operate without unnecessary restrictions. + * + * Impact: + * + * In kernels without this fix, using ``LANDLOCK_ACCESS_NET_BIND_TCP`` or + * ``LANDLOCK_ACCESS_NET_CONNECT_TCP`` would incorrectly restrict non-TCP + * stream protocols (SMC, MPTCP, SCTP), potentially breaking applications + * that rely on these protocols while using Landlock network restrictions. */ LANDLOCK_ERRATUM(1) diff --git a/security/landlock/errata/abi-6.h b/security/landlock/errata/abi-6.h index 5113a829f87e..5cb1475c7ea8 100644 --- a/security/landlock/errata/abi-6.h +++ b/security/landlock/errata/abi-6.h @@ -15,5 +15,15 @@ * interaction between threads of the same process should always be allowed. * This change ensures that any thread is allowed to send signals to any other * thread within the same process, regardless of their domain. + * + * Impact: + * + * This problem only manifests when the userspace process is itself using + * :manpage:`libpsx(3)` or an equivalent mechanism to enforce a Landlock policy + * on multiple already-running threads at once. Programs which enforce a + * Landlock policy at startup time and only then become multithreaded are not + * affected. Without this fix, signal scoping could break multi-threaded + * applications that expect threads within the same process to freely signal + * each other. */ LANDLOCK_ERRATUM(2) diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c index 3e4e99deb7f9..0d66a68677b7 100644 --- a/security/landlock/syscalls.c +++ b/security/landlock/syscalls.c @@ -158,9 +158,11 @@ static const struct file_operations ruleset_fops = { /* * The Landlock ABI version should be incremented for each new Landlock-related * user space visible change (e.g. Landlock syscalls). This version should - * only be incremented once per Linux release, and the date in + * only be incremented once per Linux release. When incrementing, the date in * Documentation/userspace-api/landlock.rst should be updated to reflect the * UAPI change. + * If the change involves a fix that requires userspace awareness, also update + * the errata documentation in Documentation/userspace-api/landlock.rst . */ const int landlock_abi_version = 8; |
