CVE-2026-89643 PUBLISHED

audit: avoid dropping live tree ref on fsnotify rule autoremove

Assigner: Linux
Reserved: 11.09.2026 Published: 11.09.2026 Updated: 13.09.2026

In the Linux kernel, the following vulnerability has been resolved:

audit: avoid dropping live tree ref on fsnotify rule autoremove

audit_del_rule() is used for both netlink deletion templates and internal fsnotify autoremove. The former passes a parsed template which owns a temporary tree reference; the latter passes the installed entry itself.

The unconditional audit_put_tree() at the end of audit_del_rule() assumes the template case. For mixed AUDIT_DIR plus AUDIT_EXE rules, an fsnotify autoremove event therefore drops the installed rule's live tree reference. Repeating this across rules sharing the same tree can free the tree while another rule still references it, and a later autoremove dereferences the freed pathname while comparing rules.

Move the temporary-tree put to audit_rule_change(), the caller that owns deletion templates. Keep it in the AUDIT_DEL_RULE cleanup so both successful deletion and -ENOENT still release the parser-owned tree.

[PM: dropped unnecessary comment for line length reasons]

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8

AV:N - audit_autoremove_mark_rule() runs from fsnotify FS_MOVE_SELF/FS_DELETE_SELF/FS_UNMOUNT on the AUDIT_EXE parent directory; nfsd and ksmbd vfs_rename/vfs_rmdir of that directory reach the same path over the network, not only local renameat/rmdir. AC:L - Each EXE fsnotify autoremove deterministically extra-puts the live shared audit_tree; the attacker issues sequential directory renames/rmdirs they fully control and needs no race or memory layout beyond their influence. PR:N - Triggering requires only renaming or rmdir'ing the parent directory of an audited executable on a local or NFS/SMB-exported path; a remote client needs no local account, CAP_AUDIT_CONTROL, or init-namespace root beyond export write access. UI:N - The attacker triggers autoremove with their own rename/rmdir (local or via nfsd/ksmbd); no other user must open files, mount a filesystem, or otherwise interact. S:U - The use-after-free corrupts host kernel heap (struct audit_tree) and stays within the same kernel security authority; it is not a VM escape, IOMMU bypass, or other documented cross-boundary impact. C:H - Use-after-free of the shared audit_tree lets a later audit_compare_rule() strcmp the freed pathname and remaining rules dereference attacker-reclaimed tree objects, enabling arbitrary kernel reads. I:H - The dangling tree is then used in audit_remove_tree_rule() list_del/list_move and prune_one() after extra puts free it, enabling heap spraying, list corruption, arbitrary writes, and control-flow hijack. A:H - Dereferencing the freed audit_tree pathname or underflowing its refcount during prune oopses/panics the kernel; the UAF can be triggered repeatedly for denial of service.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 34d99af52ad40bd498ba66970579a5bc1fb1a3bc to cf37b61b5420fd4600fe78cf8c24da6e4d9bfe28 (excl.)
  • affected from 34d99af52ad40bd498ba66970579a5bc1fb1a3bc to 636a99bab36ba27515363d325866c0273ac83b3e (excl.)
  • affected from 34d99af52ad40bd498ba66970579a5bc1fb1a3bc to 583cf579b32d99e3fe4e9c8ecc4d852e3708fbec (excl.)
  • affected from 34d99af52ad40bd498ba66970579a5bc1fb1a3bc to 783f0f0974c156aca630f4ffff248671082a098d (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.3 is affected
  • unaffected from 0 to 4.3 (excl.)
  • unaffected from 6.12.109 to 6.12.* (incl.)
  • unaffected from 6.18.50 to 6.18.* (incl.)
  • unaffected from 7.2.4 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References