LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Question about fanotify behavior: if 2 or more processes monitor the same file (https://www.linuxquestions.org/questions/linux-security-4/question-about-fanotify-behavior-if-2-or-more-processes-monitor-the-same-file-4175625784/)

wzis 03-17-2018 06:40 PM

Question about fanotify behavior: if 2 or more processes monitor the same file
 
For example, if I want to block some process to access a directory /path/to/dir, I used following marks:
FAN_ACCESS_PERM | FAN_EVENT_ON_CHILD | FAN_OPEN_PERM
But my question is if the attacker wants to access files under that dir, and created a program to use fanotify to monitor the same dir, and runs that program to grant permission to his attacking program, it seems his fanotify program could do that even when the right program wants to prohibit the attacking program to access the files under the protected dir.
Is my understanding about the fanotify not right? Or anyone knows the right way to block root process to access a dir?


All times are GMT -5. The time now is 04:57 PM.