CVE-2024-56740
HighIn 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.
CVSS 3.1 score
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness type
CWE-787CVE-2024-56740 is a Out-of-bounds Write vulnerability
What is Out-of-bounds Write?
The product writes data past the end or before the beginning of the intended buffer. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.12
and later are affected. Fixed in
6.12.2,
6.13
and their respective stable series.
References
The following references provide additional information about CVE-2024-56740 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/650703bc4ed3edf841e851c99ab8e7ba9e5262a3
-
PatchKernel patch commithttps://git.kernel.org/stable/c/de5dac261eeab99762bbdf7c20cee5d26ef4462e
Frequently asked questions
-
What is CVE-2024-56740?
CVE-2024-56740 is a High severity Linux kernel vulnerability with a CVSS score of 7.8 out of 10 , classified as an Out-of-bounds Write flaw (CWE-787) . It affects Linux kernel versions from 6.12 onward and has been patched in 6.12.2 and 6.13. CVE-2024-56740 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-56740?
CVE-2024-56740 has a CVSS score of 7.8 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. -
Is there a patch available for CVE-2024-56740?
Yes — CVE-2024-56740 has been patched. Fixed versions include 6.12.2 and 6.13. If you are running Linux kernel 6.12 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2024-56740 actively exploited?
No — CVE-2024-56740 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Out-of-bounds Write (CWE-787)?
The product writes data past the end or before the beginning of the intended buffer. View CWE-787 on MITRE CWE →