CVE-2026-31402
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-debug-devel-matched | errata.rockylinux.org | 6.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-devel | errata.rockylinux.org | 5.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-core | errata.rockylinux.org | 5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64 |
| perf6.18 | Amazon Linux | 1:6.18.20-20.229.amzn2023 |
| kernel6.18-modules-extra-common | Amazon Linux | 1:6.18.20-20.229.amzn2023 |
| kernel-rt-64k-modules-core | errata.rockylinux.org | 5.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-debuginfo | errata.rockylinux.org | 5.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-libbpf | Amazon Linux | 1:6.18.20-20.229.amzn2023 |
| kernel | errata.rockylinux.org | 5.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-doc | errata.rockylinux.org | 4.18.0-553.123.1.el8, 0:4.18.0-553.123.1.el8_10.noarch |
| kernel-rt-64k-debug-core | errata.rockylinux.org | 5.14.0-687.10.1.el9, 5.14.0-611.54.1.el9, 0:5.14.0-611.54.1.el9_7.aarch64 |
| kernel-core | errata.rockylinux.org | 5.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
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 |
| Linux | Linux | 2.6.12, 0, 5.10.253 |
| Red Hat | Red Hat Enterprise Linux Real Time for NFV E4S (v.9.2) | |
| Red Hat | Red Hat Enterprise Linux AppStream EUS (v.9.4) | |
| amazon:2023 | perf6.18 | 0 |
| amazon:2023 | kernel6.18-modules-extra-common | 0 |
| amazon:2023 | kernel6.18-libbpf | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| Red Hat | Red Hat Enterprise Linux BaseOS AUS (v.8.6) | |
| linux | linux_kernel | 2.6.12, 2.6.12, 2.6.12 |
| amazon:2023 | kernel-tools-devel | 0 |
| Red Hat | Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions | |
| Red Hat | Red Hat Enterprise Linux BaseOS (v. 10) | |
| amazon:2023 | kernel6.18-libbpf-static | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| Red Hat | Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | 0:5.14.0-70.178.1.rt21.250.el9_0 |
| amazon:2023 | python3-perf6.18 | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.5, 3.1.7, 3.1.6 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | bpftool | 0 |
…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
References
- https://access.redhat.com/security/cve/CVE-2026-31402 vdb
- RHBZ#2454844 issue
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31402.json url
- https://access.redhat.com/errata/RHSA-2026:14823 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:14925 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:14869 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:15883 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:13566 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:19569 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:13936 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:13734 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:10108 vendor-advisory
…and 18 more