[PATCH 0/2] landlock: Fix landlock_restrict_self() on long executable paths

From
Daejun Park via B4 Relay <devnull+daejun7.park.samsung.com@kernel.org>
Date
2026-11-11 04:54:48
Also in
b4-sent, linux-doc, linux-kselftest, lkml, stable
A task whose executable has an absolute path longer than 4106 bytes
triggers a WARN and cannot sandbox itself. Patch 2 adds selftests that
fail without patch 1.

Tested on v7.4-rc2 with KASAN and lockdep. landlock_restrict_self()
from 4107- and 4350-byte paths fails before the series and works after
it. The domain records then show exe="<too_long>". The other Landlock
selftests pass on both kernels, apart from five skipped hostfs tests.

---
Daejun Park (2):
      landlock: Fix landlock_restrict_self() failure on long executable paths
      selftests/landlock: Test a long executable path

 Documentation/admin-guide/LSM/landlock.rst         |   3 +-
 security/landlock/domain.c                         |  15 +-
 security/landlock/domain.h                         |   3 +-
 tools/testing/selftests/landlock/fs_test.c         | 175 +++++++++++++++++++++
 .../testing/selftests/landlock/wait-pipe-sandbox.c |   3 +-
 5 files changed, 192 insertions(+), 7 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261110-landlock-long-exe-61cbbfbc3300

Best regards,
-- 
Daejun Park [off-list ref]

Thread (5 messages) 5 messages, 2 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help