CRITICAL Introduced in 4.3
audit TreeRef UAF
CVE-2026-89643
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.9MEDIUM
01Description
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]
02KernelScan AI Analysis
Risk summary
A use-after-free in the Linux kernel audit subsystem allows a local attacker to trigger premature freeing of an audit tree reference via fsnotify rule autoremove events on mixed AUDIT_DIR and AUDIT_EXE rules. This can lead to kernel memory corruption, potentially allowing privilege escalation or denial of service.
Vulnerability analysis
The audit subsystem handles both manual rule removal and automatic removal when a watched directory disappears. The shared cleanup code unconditionally drops a reference count on the shared directory, which is correct for manual removal but wrong for automatic removal because it releases a live reference still held by an installed rule. When several rules watch the same directory, repeated automatic removals can free that shared data while another rule still needs it, and a later automatic removal then accesses the freed memory while comparing rules. The fix moves the extra reference drop to the manual-removal path only, so automatic cleanups no longer touch the live reference. A local user can trigger this by causing filesystem changes in a watched directory on a system that has audit rules tracking both directories and executables.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.3 | 5.10.270 | 9cac21f8eb82 |
| 5.15 | 4.3 | 5.15.221 | b322cc7adcd2 |
| 6.1 | 4.3 | 6.1.188 | 695c85dc345a |
| 6.12 | 4.3 | 6.12.109 | cf37b61b5420 |
| 6.18 | 4.3 | 6.18.50 | 636a99bab36b |
| 6.6 | 4.3 | 6.6.157 | 01b0ec8c397b |
| 7.2 | 4.3 | 7.2.4 | 583cf579b32d |
| mainline | 4.3 | 7.3 | 783f0f0974c1 |
| cip/5.10 | 4.3 | 5.10.271-cip78 | 9cac21f8eb82 |
| cip/6.1 | 4.3 | 6.1.189-cip61 | 695c85dc345a |
| cip/6.1-rt | 4.3 | 6.1.189-cip61-rt32 | 695c85dc345a |
| cip/6.12 | 4.3 | 6.12.111-cip32 | cf37b61b5420 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |