linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 215676] New: fanotify Ignoring/Excluding a Directory not working with FAN_MARK_MOUNT
Date: Sat, 12 Mar 2022 11:19:16 +0000	[thread overview]
Message-ID: <bug-215676-13602@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=215676

            Bug ID: 215676
           Summary: fanotify Ignoring/Excluding a Directory not working
                    with FAN_MARK_MOUNT
           Product: File System
           Version: 2.5
    Kernel Version: 5.11.0-27
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: ext4
          Assignee: fs_ext4@kernel-bugs.osdl.org
          Reporter: talkwithsrinivas@yahoo.co.in
        Regression: No

Created attachment 300557
  --> https://bugzilla.kernel.org/attachment.cgi?id=300557&action=edit
Test program to show directory exclusion not working

If a  process calls fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
FAN_OPEN_PERM, 0, "/mountpoint") no other directory exclusions can be applied.

However a path (file) exclusion can still be applied using 

fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_IGNORED_MASK |
FAN_MARK_IGNORED_SURV_MODIFY, FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,
"/tmp/fio/abc");  ===> path exclusion that works.


I think the directory exclusion not working is a bug as otherwise AV solutions
cant exclude directories when using FAN_MARK_MOUNT.

I believe the change should be simple since we are already supporting path
exclusions. So we should be able to add the same for the directory inode.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2022-03-12 11:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 11:19 bugzilla-daemon [this message]
2022-03-15 11:57 ` [Bug 215676] fanotify Ignoring/Excluding a Directory not working with FAN_MARK_MOUNT bugzilla-daemon

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=bug-215676-13602@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).