[PATCH 2/2] fanotify: call fanotify_events_supported() before path_permission() and security_path_notify()
Paul Moore
paul at paul-moore.com
Fri Feb 20 22:16:14 UTC 2026
On Mon, Feb 16, 2026 at 10:14 AM Ondrej Mosnacek <omosnace at redhat.com> wrote:
>
> The latter trigger LSM (e.g. SELinux) checks, which will log a denial
> when permission is denied, so it's better to do them after validity
> checks to avoid logging a denial when the operation would fail anyway.
>
> Fixes: 0b3b094ac9a7 ("fanotify: Disallow permission events for proc filesystem")
> Signed-off-by: Ondrej Mosnacek <omosnace at redhat.com>
> ---
> fs/notify/fanotify/fanotify_user.c | 25 ++++++++++---------------
> 1 file changed, 10 insertions(+), 15 deletions(-)
Reviewed-by: Paul Moore <paul at paul-moore.com>
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list