lockd, nfsd: RCU-protect nlmsvc_ops dispatch
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.114, 6.18.57, 7.2.4
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: lockd, nfsd: RCU-protect nlmsvc_ops dispatch nlmsvc_ops is published by nfsd_lockd_init() and cleared by nfsd_lockd_shutdown() with plain stores, while lockd dereferences it unguarded from dispatch sites in fs/lockd/svcsubs.c. The pointer targets nfsd's .rodata and the fopen/fclose callbacks live in nfsd's .text, so a stale load after rmmod nfsd results in either a NULL deref or a module-text use-after-free. Declare nlmsvc_ops as __rcu, publish via rcu_assign_pointer(), clear via RCU_INIT_POINTER() + synchronize_rcu(). Add a struct module *owner field to nlmsvc_binding and pin the module across indirect calls with try_module_get/module_put. When the binding is torn down, fall back to fput() to avoid leaking struct file references.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 43943532c105ea8fe26039a1347cfda4ac0fcadc; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 6e7495972039f212e336e552b58cac9dd54611c3; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 836ce2b99bcce6d68c58edd04efbc5cd1fd581af; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 3c461a1820088fb5889d73a6522369bde45527a9; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 641e5e20852359b8c31149be4598884e30652f60
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.4