CVE-2026-99374: NFSv4/flexfiles: Use the full 64-bit stripe_unit
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
NFSv4/flexfiles: Use the full 64-bit stripe_unit
ff_layout_alloc_lseg() decodes stripe_unit as the 64-bit value the protocol defines and struct nfs4_ff_layout_segment stores it as one, but both consumers narrow it back to 32 bits: nfs4_ff_layout_calc_dss_id() divides with do_div(), which casts the divisor, and ff_layout_pg_test() copies it into a u32 first. A stripe_unit that does not fit is silently truncated, so the client stripes on a unit the server did not specify -- or divides by zero, if the low 32 bits happen to be clear.
Divide by the full value, with div64_u64() and div64_u64_rem().
The Linux kernel CVE team has assigned CVE-2026-99374 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.18 with commit 20b1d75fb840cc27490028a5b13914e22375f273 and fixed in 6.18.61 with commit 43b9e0c39eed665be2267329b5c041ba2b2a997c Issue introduced in 6.18 with commit 20b1d75fb840cc27490028a5b13914e22375f273 and fixed in 7.3.2 with commit 2e58e4f9a8dcab90d384d5888ffec38c8718ea05 Issue introduced in 6.18 with commit 20b1d75fb840cc27490028a5b13914e22375f273 and fixed in 7.4-rc1 with commit 0cc1191538b1523dfe944eedc799fdd146c05fbf
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99374
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/nfs/flexfilelayout/flexfilelayout.c
fs/nfs/flexfilelayout/flexfilelayout.h
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/43b9e0c39eed665be2267329b5c041ba2b2a997c https://git.kernel.org/stable/c/2e58e4f9a8dcab90d384d5888ffec38c8718ea05 https://git.kernel.org/stable/c/0cc1191538b1523dfe944eedc799fdd146c05fbf