]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
audit: add fchmodat2() to change attributes class
authorJeffrey Bencteux <jeff@bencteux.fr>
Mon, 24 Nov 2025 19:49:30 +0000 (20:49 +0100)
committerPaul Moore <paul@paul-moore.com>
Mon, 15 Dec 2025 19:27:18 +0000 (14:27 -0500)
fchmodat2(), introduced in version 6.6 is currently not in the change
attribute class of audit. Calling fchmodat2() to change a file
attribute in the same fashion than chmod() or fchmodat() will bypass
audit rules such as:

-w /tmp/test -p rwa -k test_rwa

The current patch adds fchmodat2() to the change attributes class.

Signed-off-by: Jeffrey Bencteux <jeff@bencteux.fr>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/asm-generic/audit_change_attr.h

index cc840537885fbcd3bd470c2382cf9c49f5b05aa4..ddd90bbe40dfcb091f743b4a5bd1b98a40aba57a 100644 (file)
@@ -26,6 +26,9 @@ __NR_fremovexattr,
 __NR_fchownat,
 __NR_fchmodat,
 #endif
+#ifdef __NR_fchmodat2
+__NR_fchmodat2,
+#endif
 #ifdef __NR_chown32
 __NR_chown32,
 __NR_fchown32,