CVE-2026-90149: NFSv4/flexfiles: fix NULL dereference for NFSv4.0 data servers
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
NFSv4/flexfiles: fix NULL dereference for NFSv4.0 data servers
flexfiles accepts NFSv4.0 data servers, but two NFSv4 code paths assume the data server client has a session. Unlike NFSv4.1+, an NFSv4.0 client has no session (clp->cl_session is NULL; it uses clp->cl_slot_tbl), so I/O to a v4.0 flexfiles DS oopses:
- nfs4_init_ds_session() dereferences clp->cl_session->session_state while seeding the DS lease. It also only seeds cl_lease_time when NFS4_SESSION_INITING is set; without a session that never happens, so cl_lease_time stays 0 and nfs4_renew_state() busy-loops, requeuing every 5 seconds. Seed the lease whenever there is no session and return before touching session state.
- ff_layout_async_handle_error_v4() dereferences
clp->cl_session->fc_slot_table on every DS I/O error. Fall back to the
v4.0 transport slot table (clp->cl_slot_tbl) when there is no session.The Linux kernel CVE team has assigned CVE-2026-90149 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.12 with commit a7878ca140084ec267ede48fce64d7e60f6d873e and fixed in 6.18.52 with commit 163c16e01f53fc8eb8d0f3484ae6c382265ecbbd Issue introduced in 4.12 with commit a7878ca140084ec267ede48fce64d7e60f6d873e and fixed in 7.2.6 with commit 436a214514e24103159aea455147d58b44a8a585 Issue introduced in 4.12 with commit a7878ca140084ec267ede48fce64d7e60f6d873e and fixed in 7.3-rc1 with commit 2b03ebbf8d5e8f6af4ecd6c65375232dd1ec32cc
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-90149
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/nfs4session.c
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/163c16e01f53fc8eb8d0f3484ae6c382265ecbbd https://git.kernel.org/stable/c/436a214514e24103159aea455147d58b44a8a585 https://git.kernel.org/stable/c/2b03ebbf8d5e8f6af4ecd6c65375232dd1ec32cc