KernelScan.io

HIGH Introduced in 2.6.12

lockd NlmOps UAF

CVE-2026-89709

CVSS 8.1 / 10.0 NVD

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI6.4MEDIUM

01

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.

02

Engine v0.6.0

Risk summary

A race between the lock daemon and the network file server module teardown can leave stale pointers to freed module text, enabling a privileged local attacker to trigger a use-after-free or NULL dereference. Exploitation requires carefully timing the module unload against active file-lock requests. The impact includes potential kernel memory corruption or denial of service.

Affectedfs/lockd/svcsubs.c (lockd)

Vulnerability analysis

The lock daemon uses a callback pointer into the network file server module to open and close files during lock operations. This pointer was updated and read without proper synchronization, so if the server module is unloaded while the lock daemon is still handling a request, the pointer may reference freed memory or become invalid, leading to a use-after-free or system crash. The fix protects the pointer with read-copy-update rules and keeps the server module pinned in memory while the lock daemon is using its callbacks. The flaw can be triggered when the system is running as a network file server and a privileged local actor unloads the server module while active lock requests are being processed.

03

BranchIntroducedFixed inPatch commit
6.122.6.126.12.1146e7495972039
6.182.6.126.18.57836ce2b99bcc
6.62.6.126.6.16043943532c105
7.22.6.127.2.43c461a182008
mainline2.6.127.3641e5e208523

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.112-cip33)
cip/6.1Affected — no CIP fix yet (latest 6.1.189-cip61)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.271-cip78)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)