Linux KernelOperating system · Linux

CVE-2026-31402

CRITICAL · 9.8 CVSS v3.1 Published 2026-04-03
Fix available
A fix is available. Upgrade to 5.10.253 / 6.1.167 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Heap overflow vulnerability in Linux kernel's NFSv4.0 LOCK replay cache where a fixed 112-byte buffer is overflown by up to 944 bytes when encoding LOCK denied responses containing large lock owner fields (up to 1024 bytes). The read_bytes_from_xdr_buf() function copies data without bounds checking, causing slab-out-of-bounds write beyond the rp_ibuf array.

MitigationApply the kernel patch that adds a bounds check comparing encoded response length against NFSD4_REPLAY_ISIZE before copying; if response is too large, skip caching the replay payload while still caching the status. Given CVSS 9.8, prioritize patching immediately.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Linux KernelOperating system
Affected:>= 2.6.12.1, < 5.10.253>= 5.11, < 6.1.167>= 6.2, < 6.6.130>= 6.7, < 6.12.78>= 6.13, < 6.18.20>= 6.19, < 6.19.10= 2.6.12= 7.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check kernel version
    Run 'uname -r' or 'cat /proc/version' and compare the installed kernel version against the affected ranges: >= 2.6.12.1, < 5.10.253; >= 5.11, < 6.1.167; >= 6.2, < 6.6.130; >= 6.7, < 6.12.78; >= 6.13, < 6.18.20; >= 6.19, < 6.19.10; = 2.6.12; = 7.0
    Affected if The kernel version falls within any of the listed vulnerable ranges
  2. Verify nfsd is running
    Run 'ps aux | grep nfsd' or 'systemctl status nfs-server' (or equivalent service manager command) to check if the NFS daemon is active
    Affected if The nfsd service is running as an NFSv4.0 server
  3. Check for NFSv4.0 exports
    Run 'exportfs -v' to list exported filesystems, then inspect /etc/exports or the output for 'vers=4' or 'vers=4.0' mount options indicating NFSv4.0 is enabled
    Affected if NFSv4.0 exports are configured and active
  4. Confirm replay cache is in use
    The replay cache (rp_ibuf) is automatically used for NFSv4.0 LOCK operations. This cannot be disabled via user configuration; it is a core part of the NFSv4.0 protocol implementation in nfsd
    Affected if The system is acting as an NFSv4.0 server handling LOCK requests (inherent to NFSv4.0)

The system is affected if it runs a vulnerable kernel version listed above AND runs nfsd as an NFSv4.0 server with active exports, as the 112-byte replay buffer will overflow when processing LOCK denied responses with large lock owners.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.10.253 / 6.1.167 / 6.6.130 or later
Fixed in 5.10.2536.1.1676.6.130
Vendor patch git.kernel.org →
Interim mitigation

Apply the kernel patch that adds a bounds check comparing encoded response length against NFSD4_REPLAY_ISIZE before copying; if response is too large, skip caching the replay payload while still caching the status. Given CVSS 9.8, prioritize patching immediately.

Recommended fix High confidence

Linux kernel 5.10.253 / 6.1.167 / 6.6.130 / 6.12.78 (or later, depending on which branch you are on)

  1. 1. Identify the currently running Linux kernel version using `uname -r`
  2. 2. Determine which version branch your kernel belongs to (e.g., 5.10.x, 6.1.x, 6.2.x, 6.7.x, or 6.12.x)
  3. 3. For kernels in the 5.10.x branch (< 5.10.253): upgrade to kernel version 5.10.253 or later
  4. 4. For kernels in the 6.1.x branch (< 6.1.167): upgrade to kernel version 6.1.167 or later
  5. 5. For kernels in the 6.2.x through 6.6.x branch (< 6.6.130): upgrade to kernel version 6.6.130 or later
  6. 6. For kernels in the 6.7.x through 6.12.x branch (< 6.12.78): upgrade to kernel version 6.12.78 or later
  7. 7. If running a long-term support (LTS) kernel, prefer the latest available LTS release in your branch (e.g., 6.1.x LTS or 6.6.x LTS)
  8. 8. After kernel upgrade, reboot the system to load the patched kernel
Caveat Kernel upgrades may require rebuilding third-party kernel modules, and downtime is required for reboot. Ensure compatibility with userspace tools and hardware drivers before upgrading.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Linux Kernel Scoped from the published advisory
  • Consultation3.0 h
  • Implementation4.0 h
  • Testing8.0 h
  • Review / QA3.0 h
18.0 hours of engineering $3,060
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,896.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-31402 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-31402 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data