audit: fix potential use-after-free in audit_del_rule()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 34d99af52ad40bd498ba66970579a5bc1fb1a3bc · < cae0dfed5d307b240bff71c3cf206652d1b6f215| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
audit: fix potential use-after-free in audit_del_rule()
`audit_del_rule()` destroys `e->rule.exe` via `audit_remove_mark_rule()` before unlinking the rule from RCU-visible filter lists and waiting for a grace period. Concurrent readers in `audit_filter()` and `audit_filter_rules()` still dereference `e->rule.exe`, while the fsnotify mark can be freed on an independent lifetime path. This creates a use-after-free window during rule deletion.
Fix this by unlinking the rule from the RCU-visible lists and invoking `synchronize_rcu()` before calling `audit_remove_mark_rule()` (and other rule removal helpers). This ensures that all existing RCU readers have exited the critical section before any underlying resources are destroyed.
From the CVE record · Linux
The Linux kernel’s audit rule deletion path can free a resource while concurrent audit readers still use it, creating a use-after-free window. This occurs during rule deletion when readers are active. The input does not specify attacker access requirements, user interaction, or what an attacker could achieve.
Engineers running the Linux kernel should check their installations; affected versions are not specified.