CVE-2026-99513: lockd: Fix use-after-free in nlmsvc_retry_blocked
In the Linux kernel, the following vulnerability has been resolved:
lockd: Fix use-after-free in nlmsvcretryblocked
nlmsvcretryblocked() examines the block at the head of nlmblocked under nlmblockedlock, then releases the lock before calling nlmsvcgrantblocked() or retrydeferredblock(). The nlmblocked list reference is all that keeps the block alive across that window. nlmsvcgrantblocked() does take one of its own, but not until after the lock has been dropped. Unmounting the nfsd filesystem while a lock request is still blocked reaches nlmsvctraverseblocks(), which drops the list reference and frees the block along with the nlmrqst hanging off it.
BUG: KASAN: slab-use-after-free in nlmasynccall+0xd6/0x230 Read of size 8 at addr ffff88811b04c808 by task lockd/8377 nlmasynccall+0xd6/0x230 nlmsvcretryblocked+0x61c/0x800 lockd+0x144/0x1c0 Freed by task 8392: nlmsvcreleaseblock+0x231/0x290 nlmsvctraverseblocks+0x139/0x1b0 nlmtraversefiles+0x1aa/0xa00 nlmsvcfreehostresources+0x12/0x60 nlmshutdownhostsnet+0x127/0x280 lockddown+0xd5/0x1c0
Take a reference before releasing nlmblockedlock and drop it once the retry has run.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2