CVE-2024-56740
Last modified
CVE-2024-56740 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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.. EPSS estimates a 0.19% chance of exploitation in the next 30 days.
Description
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | >= 6.12, < 6.12.2 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2024-56740?
How severe is CVE-2024-56740?
How do I fix CVE-2024-56740?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2024
- CVE-2024-56734Better Auth is an authentication library for TypeScript. An …6.1
- CVE-2024-56736Server-Side Request Forgery (SSRF) vulnerability in Apache H…6.5
- CVE-2024-56737GNU GRUB (aka GRUB2) through 2.12 has a heap-based buffer ov…8.8
- CVE-2024-56738GNU GRUB (aka GRUB2) through 2.12 does not use a constant-ti…5.3
- CVE-2024-56739In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-5674The Newsletter - API v1 and v2 addon plugin for WordPress is…6.5
- CVE-2024-56741Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2024-56742In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-56743In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-56744In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-56745In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-56746In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2024-56740?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
