From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH 1/2] landlock: Fix landlock_restrict_self() failure on long executable paths
Date: Wed, 11 Nov 2026 04:59:21 +0000 [thread overview]
Message-ID: <sashiko-outbox-208320@kernel.org> (raw)
In-Reply-To: <20261111-landlock-long-exe-v1-1-588cfd174a10@samsung.com>
> From: Daejun Park <daejun7.park@samsung.com>
>
> get_current_exe() treats a d_path() error on the current executable as
> a bug. But an absolute path is not bounded by PATH_MAX, and d_path()
> returns -ENAMETOOLONG when the path does not fit in the
> LANDLOCK_PATH_MAX_SIZE buffer.
>
> An unprivileged task with such an executable triggers the
> WARN_ON_ONCE(), and its landlock_restrict_self() call fails with
> -ENAMETOOLONG.
>
> The path is not used for enforcement. Record "<too_long>" instead, as
> audit_log_d_path() does, and create the domain.
>
> Reported-by: Dwi Siswanto <me@dw1.io>
> Closes: https://lore.kernel.org/r/20261102022018.73143-1-me@dw1.io
> Suggested-by: Dwi Siswanto <me@dw1.io>
> Fixes: 1d636984e088 ("landlock: Add AUDIT_LANDLOCK_DOMAIN and log domain status")
> Cc: stable@vger.kernel.org
> Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-landlock-long-exe-v1-0-588cfd174a10@samsung.com?part=1
next prev parent reply other threads:[~2026-11-11 4:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 4:54 [PATCH 0/2] landlock: Fix landlock_restrict_self() on long executable paths Daejun Park via B4 Relay
2026-11-11 4:54 ` [PATCH 1/2] landlock: Fix landlock_restrict_self() failure " Daejun Park via B4 Relay
2026-11-11 4:59 ` sashiko-bot [this message]
2026-11-11 4:54 ` [PATCH 2/2] selftests/landlock: Test a long executable path Daejun Park via B4 Relay
2026-11-11 5:00 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-208320@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox