public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Song Liu <song@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	jmorris@namei.org, serge@hallyn.com, kernel-team@fb.com,
	song@kernel.org
Subject: Re: [PATCH] fsnotify, lsm: Separate fsnotify_open_perm() and  security_file_open()
Date: Fri, 11 Oct 2024 17:42:26 -0400	[thread overview]
Message-ID: <a083e273353d7bc5742ab0030e5ff1f5@paul-moore.com> (raw)
In-Reply-To: <20241011203722.3749850-1-song@kernel.org>

On Oct 11, 2024 Song Liu <song@kernel.org> wrote:
> 
> Currently, fsnotify_open_perm() is called from security_file_open(). This
> is not right for CONFIG_SECURITY=n and CONFIG_FSNOTIFY=y case, as
> security_file_open() in this combination will be a no-op and not call
> fsnotify_open_perm(). Fix this by calling fsnotify_open_perm() directly.
> 
> Signed-off-by: Song Liu <song@kernel.org>
> ---
> PS: I didn't included a Fixes tag. This issue was probably introduced 15
> years ago in [1]. If we want to back port this to stable, we will need
> another version for older kernel because of [2].
> 
> [1] c4ec54b40d33 ("fsnotify: new fsnotify hooks and events types for access decisions")
> [2] 36e28c42187c ("fsnotify: split fsnotify_perm() into two hooks")
> ---
>  fs/open.c           | 4 ++++
>  security/security.c | 9 +--------
>  2 files changed, 5 insertions(+), 8 deletions(-)

This looks fine to me, if we can get an ACK from the VFS folks I can
merge this into the lsm/stable-6.12 tree and send it to Linus, or the
VFS folks can do it if they prefer (my ACK is below just in case).

As far as stable prior to v6.8 is concerned, once this hits Linus'
tree you can submit an adjusted backport for the older kernels to the
stable team.

Acked-by: Paul Moore <paul@paul-moore.com>

--
paul-moore.com

  reply	other threads:[~2024-10-11 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 20:37 [PATCH] fsnotify, lsm: Separate fsnotify_open_perm() and security_file_open() Song Liu
2024-10-11 21:42 ` Paul Moore [this message]
2024-10-12  7:09   ` Amir Goldstein
2024-10-12 17:26     ` Song Liu
2024-10-14 14:11 ` Jan Kara

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=a083e273353d7bc5742ab0030e5ff1f5@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jmorris@namei.org \
    --cc=kernel-team@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=song@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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