VDB

CVE-2026-31402

CVE-2026-31402 PUBLISHED CVSS 9.8 CRITICAL

nfsd: fix heap overflow in NFSv4.0 LOCK replay cache

Reported by linux · Published April 3, 2026

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix heap overflow in NFSv4.0 LOCK replay cache The NFSv4.0 replay cache uses a fixed 112-byte inline buffer (rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses. This size was calculated based on OPEN responses and does not account for LOCK denied responses, which include the conflicting lock owner as a variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT). When a LOCK operation is denied due to a conflict with an existing lock that has a large owner, nfsd4_encode_operation() copies the full encoded response into the undersized replay buffer via read_bytes_from_xdr_buf() with no bounds check. This results in a slab-out-of-bounds write of up to 944 bytes past the end of the buffer, corrupting adjacent heap memory. This can be triggered remotely by an unauthenticated attacker with two cooperating NFSv4.0 clients: one sets a lock with a large owner string, then the other requests a conflicting lock to provoke the denial. We could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full opaque, but that would increase the size of every stateowner, when most lockowners are not that large. Instead, fix this by checking the encoded response length against NFSD4_REPLAY_ISIZE before copying into the replay buffer. If the response is too large, set rp_buflen to 0 to skip caching the replay payload. The status is still cached, and the client already received the correct response on the original request.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-debug-devel-matchederrata.rockylinux.org6.12.0-211.16.1.el10, 6.12.0-124.55.1.el10, 5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:6.12.0-124.55.1.el10_1.aarch64, 0:5.14.0-611.54.1.el9_7.ppc64le
kernel-rt-develerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.x86_64
kernel-rt-64k-coreerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64
perf6.18Amazon Linux1:6.18.20-20.229.amzn2023
kernel6.18-modules-extra-commonAmazon Linux1:6.18.20-20.229.amzn2023
kernel-rt-64k-modules-coreerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64
kernel-rt-debug-debuginfoerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64
kernel6.18-libbpfAmazon Linux1:6.18.20-20.229.amzn2023
kernelerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.x86_64, 0:5.14.0-611.54.1.el9_7.src
kernel-docerrata.rockylinux.org4.18.0-553.123.1.el8, 0:4.18.0-553.123.1.el8_10.noarch
kernel-rt-64k-debug-coreerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64
kernel-coreerrata.rockylinux.org5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.ppc64le

13 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
LinuxLinux2.6.12, 0, 5.10.253
Red HatRed Hat Enterprise Linux Real Time for NFV E4S (v.9.2)
Red HatRed Hat Enterprise Linux AppStream EUS (v.9.4)
amazon:2023perf6.180
amazon:2023kernel6.18-modules-extra-common0
amazon:2023kernel6.18-libbpf0
amazon:2023kernel6.12-modules-extra-common0
Red HatRed Hat Enterprise Linux BaseOS AUS (v.8.6)
linuxlinux_kernel2.6.12, 2.6.12, 2.6.12
amazon:2023kernel-tools-devel0
Red HatRed Hat Enterprise Linux 9.4 Update Services for SAP Solutions
Red HatRed Hat Enterprise Linux BaseOS (v. 10)
amazon:2023kernel6.18-libbpf-static0
amazon:2023kernel6.12-headers0
Red HatRed Hat Enterprise Linux 9.0 Update Services for SAP Solutions0:5.14.0-70.178.1.rt21.250.el9_0
amazon:2023python3-perf6.180
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.5, 3.1.7, 3.1.6
amazon:2023kernel0
amazon:2023bpftool0

…and 112 more

Timeline

  • Apr 3, 2026 CVE Published
  • Apr 3, 2026 PoC Published
  • Apr 24, 2026 Distribution Patch (101 in total, the first dated here)
  • Apr 24, 2026 Security Advisory (102 in total, the first dated here)
  • May 18, 2026 EPSS Score (30 in total, the first dated here)
  • Jun 13, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31402
vulnetix vdb fixes CVE-2026-31402

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31402/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›