{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-31402 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2026-31402 is a critical memory corruption vulnerability in Linux kernel, published on 3 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-31402 and fix it if it is affected.\n\nWhat it is: CVE-2026-31402 is a critical memory corruption vulnerability in Linux kernel, published on 3 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-31402 in the wild and no public exploit code.\n\nAffected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-31402/ (Markdown: https://insights.sbomify.com/CVE-2026-31402/index.md)","id":"CVE-2026-31402","markdown":"https://insights.sbomify.com/CVE-2026-31402/index.md","name":"CVE-2026-31402","record":{"aliases":["BELL-CVE-2026-31402","DEBIAN-CVE-2026-31402","GHSA-7xf5-3qmr-j4c6","ROOT-OS-DEBIAN-11-CVE-2026-31402","ROOT-OS-DEBIAN-12-CVE-2026-31402","ROOT-OS-DEBIAN-13-CVE-2026-31402","ROOT-OS-UBUNTU-2204-CVE-2026-31402","ROOT-OS-UBUNTU-2404-CVE-2026-31402","UBUNTU-CVE-2026-31402"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["code_execution","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Linux kernel NFS server","requires_auth":"none","summary":"Remote attackers can trigger a heap overflow in the Linux kernel NFS server via crafted NFSv4.0 LOCK requests, potentially leading to code execution or system crashes.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[{"product":"linux_kernel","vendor":"linux"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: fix heap overflow in NFSv4.0 LOCK replay cache\n\nThe NFSv4.0 replay cache uses a fixed 112-byte inline buffer\n(rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses.\nThis size was calculated based on OPEN responses and does not account\nfor LOCK denied responses, which include the conflicting lock owner as\na variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT).\n\nWhen a LOCK operation is denied due to a conflict with an existing lock\nthat has a large owner, nfsd4_encode_operation() copies the full encoded\nresponse into the undersized replay buffer via read_bytes_from_xdr_buf()\nwith no bounds check. This results in a slab-out-of-bounds write of up\nto 944 bytes past the end of the buffer, corrupting adjacent heap memory.\n\nThis can be triggered remotely by an unauthenticated attacker with two\ncooperating NFSv4.0 clients: one sets a lock with a large owner string,\nthen the other requests a conflicting lock to provoke the denial.\n\nWe could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full\nopaque, but that would increase the size of every stateowner, when most\nlockowners are not that large.\n\nInstead, fix this by checking the encoded response length against\nNFSD4_REPLAY_ISIZE before copying into the replay buffer. If the\nresponse is too large, set rp_buflen to 0 to skip caching the replay\npayload. The status is still cached, and the client already received the\ncorrect response on the original request.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2026-04-09","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-04-09T19:10:44Z","kind":"github_poc","ref":"https://github.com/0xredash/CVE-2026-31402","stars":0,"title":"CVE-2026-31402"}],"tier":"poc_unverified"},"has_fix":true,"headline":"nfsd: fix heap overflow in NFSv4.0 LOCK replay cache","id":"CVE-2026-31402","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"linux:linux_kernel","products":["linux:linux_kernel"],"type":"memory_corruption","year":"2026"},"n_packages":0,"n_references":8,"next":{"headline":"NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd","id":"CVE-2026-31403"},"packages":[],"prev":{"headline":"HID: bpf: prevent buffer overflow in hid_hw_request","id":"CVE-2026-31401"},"products":["Linux"],"published":"2026-04-03","related":[{"cvss_score":8.8,"headline":"Linux Kernel Out-of-Bounds Write","id":"CVE-2026-53266","kev_date_added":"2026-09-18","published":"2026-06-25"},{"cvss_score":8.8,"headline":"Linux Kernel Improper Input Validation","id":"CVE-2013-6282","kev_date_added":"2022-09-15","published":"2013-11-19"},{"cvss_score":8.4,"headline":"Linux Kernel Heap-Based Buffer Overflow","id":"CVE-2022-0185","kev_date_added":"2024-08-21","published":"2022-02-11"},{"cvss_score":8.4,"headline":"Linux Kernel Privilege Escalation","id":"CVE-2013-2094","kev_date_added":"2022-09-15","published":"2013-05-14"},{"cvss_score":7.8,"headline":"Linux Kernel Unspecified","id":"CVE-2026-53362","kev_date_added":"2026-08-27","published":"2026-07-04"},{"cvss_score":7.8,"headline":"Linux Kernel Missing Initialization of a Variable","id":"CVE-2026-46300","kev_date_added":"2026-10-28","published":"2026-05-23"},{"cvss_score":7.8,"headline":"Linux Kernel Race Condition","id":"CVE-2025-39964","kev_date_added":"2026-09-18","published":"2025-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-19","vendors":["Linux"]},"summary":"Remote attackers can trigger a heap overflow in the Linux kernel NFS server via crafted NFSv4.0 LOCK requests, potentially leading to code execution or system crashes.","url":"https://insights.sbomify.com/CVE-2026-31402/"}