CVE-2024-56740: nfs/localio: must clear res.replen in nfs_local_read_done
In the Linux kernel, the following vulnerability has been resolved:
nfs/localio: must clear res.replen in nfs_local_read_done
Otherwise memory corruption can occur due to NFSv3 LOCALIO reads
leaving garbage in res.replen:
- nfs3_read_done() copies that into server->read_hdrsize; from there
nfs3_proc_read_setup() copies it to args.replen in new requests.
- nfs3_xdr_enc_read3args() passes that to rpc_prepare_reply_pages()
which includes it in hdrsize for xdr_init_pages, so that rq_rcv_buf
contains a ridiculous len.
- This is copied to rq_private_buf and xs_read_stream_request()
eventually passes the kvec to sock_recvmsg() which receives incoming
data into entirely the wrong place.
This is easily reproduced with NFSv3 LOCALIO that is servicing reads
when it is made to pivot back to using normal RPC. This switch back
to using normal NFSv3 with RPC can occur for a few reasons but this
issue was exposed with a test that stops and then restarts the NFSv3
server while LOCALIO is performing heavy read IO.
Security readout for executives and security teams
Plain-English summary
A Linux NFS client flaw can corrupt memory during NFSv3 LOCALIO reads when processing switches back to normal RPC. Successful triggering could compromise confidentiality, integrity, and availability. Exposure appears limited to specific kernel versions and configurations, so organizations should prioritize systems actively using NFSv3 LOCALIO.
Executive priority
Treat this as high priority for systems using NFSv3 LOCALIO because memory corruption may affect confidentiality, integrity, and availability. Prioritize configuration discovery and vendor-supported updates. Systems not using this feature have substantially lower apparent exposure, although exact affected-version boundaries should be confirmed with their Linux distributor.
Technical view
An uncleared res.replen value can propagate through NFSv3 read setup into RPC reply-page sizing. The resulting invalid receive-buffer length can cause incoming network data to be written to the wrong memory location. The issue is classified as CWE-787 with CVSS 3.1 score 7.8.
Likely exposure
Potentially affected Linux 6.12 and 6.13 systems using NFSv3 LOCALIO are the primary concern. The supplied version data is ambiguous around exact fixed releases. The documented trigger involves active reads followed by fallback to normal NFSv3 RPC, including after stopping and restarting the NFS server.
Exploitation context
The CVSS vector describes local access, low complexity, low privileges, and no user interaction. The source reports easy reproduction under a specific NFS workload, but provides no evidence of active exploitation. CVE-2024-56740 is not identified as a CISA KEV entry in the supplied bundle.
Researcher notes
The vulnerable data flow crosses nfs3_read_done(), nfs3_proc_read_setup(), nfs3_xdr_enc_read3args(), rpc_prepare_reply_pages(), xdr_init_pages(), and xs_read_stream_request(). The supplied stable commits are the authoritative remediation references. Public evidence does not establish weaponization, active exploitation, or a broader remotely reachable attack path.
Mitigation direction
Inventory Linux systems using NFSv3 LOCALIO, focusing on reported 6.12 and 6.13 versions.
Apply a vendor-supported kernel update containing the referenced stable fix.
Check distribution or kernel-vendor guidance for exact fixed package versions and interim mitigations.
Prioritize systems where NFS services restart or LOCALIO frequently falls back to RPC.
Validation and detection
Record each system's running kernel version and compare it with vendor-fixed package guidance.
Confirm whether NFSv3 LOCALIO is enabled and actively serving reads.
Verify the deployed kernel includes the referenced res.replen-clearing change.
Test LOCALIO reads and RPC fallback after remediation in a controlled environment.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-787: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
3Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-787 · source CWE mapping
Out-of-bounds Write
Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.