{"id":"CVE-2026-99375","summary":"NFSv4/flexfiles: fail I/O to the data server once a lock is lost","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nNFSv4/flexfiles: fail I/O to the data server once a lock is lost\n\nWhen a client loses a byte-range lock, because its lease expired and it\nmay not recover the lock (nfs.recover_lost_locks=0) or because reclaim\nfailed, it marks the lock state NFS_LOCK_LOST and fails further I/O by\nthat lock owner.  Otherwise an application that believes it holds a\nlock over a range is never told that the lock is gone, and can\noverwrite data that another client has since written under its own\nlock on that range.\n\nThe NFSv4 READ/WRITE and file layout I/O paths apply this in\nrpc_call_prepare, where nfs4_set_rw_stateid() returns -EIO for a lost\nlock.  The flexfiles data server I/O path does not: the NFSv3 data\nserver path never checked, and the check on the NFSv4 path was removed\nwhen the data server stateid began to be taken from the layout.\n\nFail read and write RPCs to the data server in rpc_call_prepare when the\nlock is lost.  The data server path has no use for the stateid that\nnfs4_set_rw_stateid() selects, and selecting it looks up a delegation\nor open stateid on every I/O.\nInstead add nfs4_lock_context_lost(), which only tests NFS_LOCK_LOST,\nand check it alongside the open state.  Its lookup,\n__nfs4_lookup_lock_state(), is split out of __nfs4_find_lock_state()\nand takes no reference: a lock state is only unlinked from\nstate-\u003elock_states under state-\u003estate_lock, so one found while holding\nthat lock cannot be freed before it is released.  Use it in\nnfs4_copy_lock_stateid() as well, which only reads the lock state under\nthat lock.  That drops a reference get and put from stateid selection\nfor all NFSv4 I/O without changing the stateid selected.\n\nTerminating the RPC in rpc_call_prepare is not enough on its own.  The\ndone callback reads the -EIO as a data server connection error, forgets\nthe device ID, and resets the I/O to pNFS (or, for an NFSv4 data\nserver, possibly to the MDS).  After a reset to pNFS a new LAYOUTGET is\ngranted and rpc_call_prepare fails the I/O again, without end.  The\nexisting NFS_CONTEXT_BAD check does not loop, since the open state is\nthen invalid and pnfs_update_layout() fails the reset I/O, but it still\nforgets the device ID.\n\nSo when an RPC that was never sent fails and the open context is bad,\nthe open state is invalid, or the lock is lost, complete it with -EIO\nwithout error handling.  An RPC that was sent and failed is handled as\nbefore, so a real data server error is still reported to the MDS.","modified":"2026-11-19T17:00:44.998275719Z","published":"2026-11-19T14:23:11.576Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99375.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7fa2ad367abe6d3155daefb57331e7fce1a17afd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/88f3916a239fc945362eaac13ca2e29f59539f42"},{"type":"WEB","url":"https://git.kernel.org/stable/c/938f374ec83912d1383810a1d31aa7ac1940b11e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fe52fa5319458d3d5f04046422b4cf954024a26f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99375.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99375"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d67ae825a59d639e4d8b82413af84d854617a87e"},{"fixed":"88f3916a239fc945362eaac13ca2e29f59539f42"},{"fixed":"938f374ec83912d1383810a1d31aa7ac1940b11e"},{"fixed":"fe52fa5319458d3d5f04046422b4cf954024a26f"},{"fixed":"7fa2ad367abe6d3155daefb57331e7fce1a17afd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99375.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.61"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99375.json"}}],"schema_version":"1.9.2"}