linux-application-whitelisting / fapolicyd

File Access Policy Daemon
GNU General Public License v3.0
192 stars 55 forks source link

Infinite loop for new mount after deleting mount #253

Open wjhunter3 opened 1 year ago

wjhunter3 commented 1 year ago

If there are no mounted watch types initially, then a second mount point to watch is detected, after the first mount point is deleted, the daemon will enter an infinite loop. To re-create, from a fresh install:

wjhunter3 commented 1 year ago

The attached patch will resolve the problem. fapolicyd-1.3.1-issue-253.patch.txt

sopos commented 1 year ago

I failed to reproduce the issue. Are the steps complete? Wasn't the fapolicyd-cli --update involved as well?

wjhunter3 commented 1 year ago

If it makes a difference I'm running fapolicyd 1.3.1 on RHEL 8, but I haven't seen any changes between 1.3.1 and 1.3.2 that would resolve the problems I'm seeing. The rules/trustdb do not come into play, so I'm not sure why fapolicyd-cli --update would be necessary.

sopos commented 1 year ago

I was trying it on rhel9. I'll try rhel8 as well.

wjhunter3 commented 1 year ago

Output from the terminals I used to recreate: issue-253-term1.txt issue-253-term2.txt

wjhunter3 commented 1 year ago

Also . . . the problem only manifests when there are no mount points to watch when fapolicyd starts.

stevegrubb commented 10 months ago

Hello, I just pushed commit d9029f8 which should take care of the problem. It fixes the code where it sits rather than making a new function. Please give it a try and let me know if it fixes your problem.