Skip to contentSkip to conversation

audit: add fchmodat2() to change attributes class

PATCH Applied Jeffrey Bencteux 2 participants 2 messages Nov 24, 2025 – Dec 15, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audit: add fchmodat2() to change attributes class

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.

---
 include/asm-generic/audit_change_attr.h | 3 +++
 1 file changed, 3 insertions(+)
include/asm-generic/audit_change_attr.h +3 -0
index cc840537885f..ddd90bbe40df 100644
@@ -26,6 +26,9 @@ __NR_fremovexattr,
 __NR_fchownat,
 __NR_fchmodat,
 #endif
+#ifdef __NR_fchmodat2
+__NR_fchmodat2,
+#endif
 #ifdef __NR_chown32
 __NR_chown32,
 __NR_fchown32,

base-commit: ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d

Signature · 1 line
2.49.0
maintainer Applied
#1 lore raw
Quoted 6 lines · On Nov 24, 2025 Jeffrey Bencteux <[email protected]> wrote:

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:

Quoted 8 lines

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

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

---
 include/asm-generic/audit_change_attr.h | 3 +++
 1 file changed, 3 insertions(+)

Merged into audit/dev, thanks.

--
paul-moore.com