CVE-2026-89485
largeUse-After-Free in Linux Kernel lockd (NFS/NLM) File Traversal
CVE-2026-89485 is a race-condition use-after-free in the Linux kernel's lockd/NLM subsystem, which implements NFS network file locking. During nlm_traverse_files(), the code pins the current file structure across a mutex_unlock window but leaves the saved 'next' list pointer unpinned, so a concurrent nlm_release_file() can free that next nlm_file object and the iterator then dereferences freed memory on the following loop step. An attacker triggers this by racing lock-release traffic against lock-table traversal on a host acting as an NFS lock server (lockd), and the CVSS 3.1 base score of 9.8 (network, no privileges, no user interaction, high C/I/A impact) reflects the resulting kernel memory corruption — in practice most plausibly a crash/DoS of the NFS server, with memory-corruption impact dependent on heap state. Any Linux system serving NFS file locks with a vulnerable kernel is affected; the flaw also silently skipped cleanup of stale lockd file entries, which the fix deliberately corrects. There is no known public proof-of-concept, the issue is not in CISA's KEV catalog, and no in-the-wild exploitation has been reported.
What to do: Apply kernel updates from your distribution as soon as patched packages are available, prioritizing hosts that export NFS filesystems or run NFS servers. If NFS file locking is not required, stop serving NFS and prevent lockd from loading; otherwise firewall NFS (2049/tcp) and the nlockmgr service ports (check /proc/fs/nfsd/portlist or rpcinfo -p) so only trusted clients can reach them. Watch NFS servers for unexplained kernel oopses or crashes around lock activity, and verify failover/lock-reclamation tooling still behaves correctly after patching, since the fix also changes stale-file cleanup during traversal.
| Linux kernel (kernel.org) Linux kernel lockd/NLM (NFS file locking, fs/lockd) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: lockd: pin next file across nlm_inspect_file lock-drop nlm_traverse_files() pins the current file with f_count++ across a mutex_unlock for nlm_inspect_file(), but nothing pins the saved next pointer. A concurrent nlm_release_file() can kfree the next file during the unlock window, and the iterator dereferences freed memory on the next loop step. Pin both current and next before the lock-drop. Advance by swapping the pinned cursors at the end of each iteration so next is always held alive across the unlock. Always call nlm_file_release() after dropping the iteration pin, regardless of whether the file matched the predicate. Use nlm_file_inuse(), which does a live walk of the inode lock list, rather than the cached f_locks field, so skipped files that never ran nlm_inspect_file() are evaluated correctly. Because every file in a hash bucket is now pinned and released, files skipped by the is_failover_file predicate that have no locks, blocks, shares, or external references are deleted during traversal. The old code never evaluated skipped files for cleanup. The new behavior is intentional: such files are stale and should not persist in the table.
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.