SecurityContext

CVE-2024-56740: Linux Kernel - Memory Corruption

  • Cve: CVE-2024-56740
  • Name: Linux Kernel - Memory Corruption
  • 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.
  • Impact: Memory corruption can lead to kernel crashes or potential privilege escalation when exploited.
  • Remediation: Update to the latest Linux kernel version where this issue is fixed.
  • Vulnerability type: out_of_bounds_rw
  • Vulnerability impact: denial_of_service, privilege_escalation
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00198
  • Epss percentile: 0.09335
  • Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  • Published at: 2024-12-29T12:15:07Z
  • Age in days: 695
  • Modified at: 2026-06-17T08:12:52Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-56740
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-787Out-of-bounds Write

References

UrlSourceTags
https://git.kernel.org/stable/c/650703bc4ed3edf841e851c99ab8e7ba9e5262a3nvdPatch
https://git.kernel.org/stable/c/de5dac261eeab99762bbdf7c20cee5d26ef4462envdPatch

Products

ProductAffectedPlatform boundSourcesUrl
linux:linux_kernel>= 6.12, < 6.12.2nonvd/v1/products/linux/linux_kernel

Projects

RepositoryLink kindsIndexedUrl
torvalds/linuxcna_commit, commityes/v1/repositories/torvalds/linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 10038339
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports