CVE-2026-31437
netfs: Fix NULL pointer dereference in netfs_unbuffered_write() on retry
Check your servers for CVE-2026-31437
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31437 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
netfs: Fix NULL pointer dereference in netfs_unbuffered_write() on retry
When a write subrequest is marked NETFS_SREQ_NEED_RETRY, the retry path in netfs_unbuffered_write() unconditionally calls stream->prepare_write() without checking if it is NULL.
Filesystems such as 9P do not set the prepare_write operation, so stream->prepare_write remains NULL. When get_user_pages() fails with -EFAULT and the subrequest is flagged for retry, this results in a NULL pointer dereference at fs/netfs/direct_write.c:189.
Fix this by mirroring the pattern already used in write_retry.c: if stream->prepare_write is NULL, skip renegotiation and directly reissue the subrequest via netfs_reissue_write(), which handles iterator reset, IN_PROGRESS flag, stats update and reissue internally.
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.30% of all scored CVEs. Scores of 30 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 72d08d2839649d1c5efbe375751f4473fa4486af, before a4d1b4ba9754bac3efebd06f583a44a7af52c0ab affected from 0c29f6d63122a0168d67cb8ecde5b4cf7fe4acb0, before 7a5482f5ce891decbf36f2e6fab1e9fc4a76a684 affected from a0b4c7a49137ed21279f354eb59f49ddae8dffc2, before e9075e420a1eb3b52c60f3b95893a55e77419ce8
Other versions: unaffected
|
| Linux |
affected from 6.18.17, before 6.18.21 affected from 6.19.7, before 6.19.11
Other versions: unaffected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31437 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31437
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31437
trivy image --scanners vuln IMAGE | grep CVE-2026-31437
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a4d1b4ba9754bac3efebd06f583a44a7af52c0ab git.kernel.org
- https://git.kernel.org/stable/c/7a5482f5ce891decbf36f2e6fab1e9fc4a76a684 git.kernel.org
- https://git.kernel.org/stable/c/e9075e420a1eb3b52c60f3b95893a55e77419ce8 git.kernel.org
Source: the record CVE-2026-31437 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse