lockd: fix NULL dereference on lockowner allocation failure
- 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.109, 6.18.50, 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
Summary
In the Linux kernel, the following vulnerability has been resolved: lockd: fix NULL dereference on lockowner allocation failure nlmclnt_locks_init_private() installs NLM file lock operations even when nlmclnt_find_lockowner() fails to allocate a lockowner. nlmclnt_proc() then returns -ENOMEM, but the VFS still tears down the partially initialized file_lock and calls locks_release_private(). That invokes nlmclnt_locks_release_private(), which dereferences fl->fl_u.nfs_fl.owner and crashes because the owner was never installed. Clear fl_ops before attempting to initialize the NLM private state, and install the NLM lock operations only after a lockowner has been allocated successfully.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 6db5af172ccc3223c8f730a9a4212f6427feee3e; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 07adfbb3de7529f58ca708a97ead7fa4fdb71056; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in d662f7fc04fde305a27f304b3cd19b614d366839; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 51af080ca4e553256c59a75a877b9b4fff828311; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 4c7fc129db061c7daab841c4f3c342d894832362
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4