From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] smack: do not override the subject label in overlayfs hooks
Date: Thu, 29 Oct 2026 16:09:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-189649@kernel.org> (raw)
In-Reply-To: <20261029155422.578322-1-m.moscicki2@samsung.com>
> Overlayfs performs operations on the upper, lower and work directories
> with the credentials of the mounter and uses the inode_copy_up() and
> dentry_create_files_as() hooks only to let the LSM choose the label of
> the inode it is about to create. Smack implemented both hooks by
> replacing smk_task in the override credentials, so the label of the
> copied file, or of the transmuting directory, became the subject of all
> access checks done in the underlying filesystems on behalf of overlayfs:
> the lookup and creation of the temporary inode in the workdir, the
> rename into the upper directory, setting the overlay xattrs.
>
> Unless that label happens to have access to the workdir and upper
> directories, or is allowed to use CAP_MAC_OVERRIDE, these operations
> fail with EACCES:
>
> lsm=SMACK fn=smack_inode_permission action=denied subject="somelabel"
> [ ... ]
> Outside overlayfs smk_create is never set, so there is no behaviour
> change there.
>
> Fixes: d6d80cb57be4 ("Smack: Base support for overlayfs")
> Signed-off-by: Mateusz Moscicki <m.moscicki2@samsung.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261029155422.578322-1-m.moscicki2@samsung.com?part=1
prev parent reply other threads:[~2026-10-29 16:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261029155517eucas1p25b05b501c3f6a8c9b58c145898f6e76e@eucas1p2.samsung.com>
2026-10-29 15:54 ` [PATCH] smack: do not override the subject label in overlayfs hooks Mateusz Moscicki
2026-10-29 16:09 ` sashiko-bot [this message]
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-189649@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