CVE-2026-99375 in Linux
Summary
by MITRE • 11/19/2026
In the Linux kernel, the following vulnerability has been resolved:
NFSv4/flexfiles: fail I/O to the data server once a lock is lost
When a client loses a byte-range lock, because its lease expired and it may not recover the lock (nfs.recover_lost_locks=0) or because reclaim failed, it marks the lock state NFS_LOCK_LOST and fails further I/O by that lock owner. Otherwise an application that believes it holds a lock over a range is never told that the lock is gone, and can overwrite data that another client has since written under its own lock on that range.
The NFSv4 READ/WRITE and file layout I/O paths apply this in rpc_call_prepare, where nfs4_set_rw_stateid() returns -EIO for a lost lock. The flexfiles data server I/O path does not: the NFSv3 data server path never checked, and the check on the NFSv4 path was removed when the data server stateid began to be taken from the layout.
Fail read and write RPCs to the data server in rpc_call_prepare when the lock is lost. The data server path has no use for the stateid that nfs4_set_rw_stateid() selects, and selecting it looks up a delegation or open stateid on every I/O. Instead add nfs4_lock_context_lost(), which only tests NFS_LOCK_LOST, and check it alongside the open state. Its lookup, __nfs4_lookup_lock_state(), is split out of __nfs4_find_lock_state() and takes no reference: a lock state is only unlinked from state->lock_states under state->state_lock, so one found while holding that lock cannot be freed before it is released. Use it in nfs4_copy_lock_stateid() as well, which only reads the lock state under that lock. That drops a reference get and put from stateid selection for all NFSv4 I/O without changing the stateid selected.
Terminating the RPC in rpc_call_prepare is not enough on its own. The done callback reads the -EIO as a data server connection error, forgets the device ID, and resets the I/O to pNFS (or, for an NFSv4 data server, possibly to the MDS). After a reset to pNFS a new LAYOUTGET is granted and rpc_call_prepare fails the I/O again, without end. The existing NFS_CONTEXT_BAD check does not loop, since the open state is then invalid and pnfs_update_layout() fails the reset I/O, but it still forgets the device ID.
So when an RPC that was never sent fails and the open context is bad, the open state is invalid, or the lock is lost, complete it with -EIO without error handling. An RPC that was sent and failed is handled as before, so a real data server error is still reported to the MDS.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel vulnerability identified in this advisory relates to improper access control within the NFSv4 flexfiles implementation, specifically concerning byte-range lock management during I/O operations. The core technical flaw stems from an inconsistency in how lost locks are handled between different data server paths. When a client loses a byte-range lock due to lease expiration or failed reclaim attempts, and subsequent recovery is disabled via nfs.recover_lost_locks=0, the kernel correctly marks the lock state as NFS_LOCK_LOST for standard I/O paths by returning -EIO in rpc_call_prepare. However, this critical check was inadvertently removed from the flexfiles data server path when stateid selection logic changed to derive stateids directly from layouts. Consequently, applications believing they hold exclusive locks over specific file ranges are not notified that those locks have been revoked. This oversight allows an application to proceed with write operations under a stale lock assumption, potentially overwriting data written by other clients who legitimately acquired the same range under their own valid locks.
This scenario presents a significant integrity risk and aligns closely with CWE-20 Improper Input Validation, as the system fails to validate the current state of file locks before permitting destructive write operations. From an adversarial perspective, this flaw could be exploited in multi-client environments where concurrent access is common. An attacker or misconfigured application holding a stale lock could corrupt shared data files without triggering immediate error conditions that would alert administrators or applications to the inconsistency. The vulnerability effectively bypasses the intended mutual exclusion guarantees provided by NFSv4 byte-range locking mechanisms, leading to silent data corruption rather than explicit failure messages. This undermines the reliability of networked storage systems relying on strict POSIX-compliant locking semantics for data consistency.
The operational impact extends beyond simple data overwriting due to secondary issues in error handling within the pNFS framework. When an RPC fails because a lock is lost, the done callback incorrectly interprets this as a generic data server connection error rather than a specific access control violation. This misinterpretation causes the system to forget the device ID and reset the I/O path back to standard pNLS or the Metadata Server (MDS). In cases where the open context remains invalid after such a reset, the system may enter an infinite loop of retrying layout operations that immediately fail again because the underlying lock state is still marked as lost. This behavior can lead to resource exhaustion and performance degradation on both client and server sides, effectively creating a denial-of-service condition through continuous failed I/O attempts rather than graceful termination.
Mitigation strategies involve applying kernel patches that restore proper validation checks in the flexfiles data server path. The fix introduces nfs4_lock_context_lost() to explicitly test for NFS_LOCK_LOST status alongside open state verification during rpc_call_prepare, ensuring that read and write RPCs are terminated early when locks are compromised. Additionally, the implementation optimizes lock state lookup by splitting __nfs4_lookup_lock_state from its parent function to avoid unnecessary reference counting overhead while maintaining thread safety under state->state_lock. Crucially, the error handling logic is refined so that failed RPCs due to lost locks or invalid open contexts complete with -EIO without triggering erroneous device ID resets or infinite retry loops. Administrators should ensure their systems are updated with these kernel fixes and consider monitoring for unusual patterns of I/O retries or data inconsistencies in shared storage environments where NFSv4 flexfiles layouts are actively used.