audit: record fanotify event regardless of presence of rules
PATCH v2 1/1 audit: record fanotify event regardless of presence of rules
When no audit rules are in place, fanotify event results are unconditionally dropped due to an explicit check for the existence of any audit rules. Given this is a report from another security sub-system, allow it to be recorded regardless of the existence of any audit rules.
To test, install and run the fapolicyd daemon with default config. Then as an unprivileged user, create and run a very simple binary that should be denied. Then check for an event with
ausearch -m FANOTIFY -ts recent
---
changelog:
v2
- re-add audit_enabled check
--- include/linux/audit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/audit.h +1 -1
@@ -527,7 +527,7 @@ static inline void audit_log_kern_module(const char *name)static inline void audit_fanotify (u32 response,struct fanotify_response_info_audit_rule *friar) { -if (!audit_dummy_context ()) +if (audit_enabled)__audit_fanotify (response, friar); }
Signature · 1 line
2.43.5
Quoted 14 lines · On Aug 6, 2025 Richard Guy Briggs <[email protected]> wrote:
When no audit rules are in place, fanotify event results are unconditionally dropped due to an explicit check for the existence of any audit rules. Given this is a report from another security sub-system, allow it to be recorded regardless of the existence of any audit rules.
To test, install and run the fapolicyd daemon with default config. Then as an unprivileged user, create and run a very simple binary that should be denied. Then check for an event with
ausearch -m FANOTIFY -ts recent
Quoted 7 lines
---
changelog:
v2
- re-addaudit_enabledcheck--- include/linux/audit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Merged into audit/dev-staging with the plan being to merge it to audit/dev once the merge window closes.
--
paul-moore.com
Quoted 23 lines · Paul Moore
Quoted 14 lines · On Aug 6, 2025 Richard Guy Briggs <[email protected]> wrote:
When no audit rules are in place, fanotify event results are unconditionally dropped due to an explicit check for the existence of any audit rules. Given this is a report from another security sub-system, allow it to be recorded regardless of the existence of any audit rules.
To test, install and run the fapolicyd daemon with default config. Then as an unprivileged user, create and run a very simple binary that should be denied. Then check for an event with
ausearch -m FANOTIFY -ts recentQuoted 7 lines
---
changelog:
v2
- re-addaudit_enabledcheck--- include/linux/audit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 2 lines
Merged into audit/dev-staging with the plan being to merge it to audit/dev once the merge window closes.
Thanks Paul.
Quoted 1 line
paul-moore.com
- RGB
--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
Upstream IRC: SunRaycer
Voice: +1.613.860 2354 SMS: +1.613.518.6570
Paul Moore
maintainerQuoted 24 lines · Richard Guy Briggs
Quoted 23 lines · Paul Moore
Quoted 21 lines · On Aug 6, 2025 Richard Guy Briggs <[email protected]> wrote:
When no audit rules are in place, fanotify event results are unconditionally dropped due to an explicit check for the existence of any audit rules. Given this is a report from another security sub-system, allow it to be recorded regardless of the existence of any audit rules.
To test, install and run the fapolicyd daemon with default config. Then as an unprivileged user, create and run a very simple binary that should be denied. Then check for an event with
ausearch -m FANOTIFY -ts recent---
changelog:
v2
- re-addaudit_enabledcheck--- include/linux/audit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines
Merged into audit/dev-staging with the plan being to merge it to audit/dev once the merge window closes.
Thanks Paul.
Now merged into audit/dev, thanks!
Signature · 1 line
paul-moore.com