CVE-2024-26640: tcp: add sanity checks to rx zerocopy
In the Linux kernel, the following vulnerability has been resolved:
tcp: add sanity checks to rx zerocopy
TCP rx zerocopy intent is to map pages initially allocated
from NIC drivers, not pages owned by a fs.
This patch adds to can_map_frag() these additional checks:
- Page must not be a compound one.
- page->mapping must be NULL.
This fixes the panic reported by ZhangPeng.
syzbot was able to loopback packets built with sendfile(),
mapping pages owned by an ext4 file to TCP rx zerocopy.
r3 = socket$inet_tcp(0x2, 0x1, 0x0)
mmap(&(0x7f0000ff9000/0x4000)=nil, 0x4000, 0x0, 0x12, r3, 0x0)
r4 = socket$inet_tcp(0x2, 0x1, 0x0)
bind$inet(r4, &(0x7f0000000000)={0x2, 0x4e24, @multicast1}, 0x10)
connect$inet(r4, &(0x7f00000006c0)={0x2, 0x4e24, @empty}, 0x10)
r5 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00',
0x181e42, 0x0)
fallocate(r5, 0x0, 0x0, 0x85b8)
sendfile(r4, r5, 0x0, 0x8ba0)
getsockopt$inet_tcp_TCP_ZEROCOPY_RECEIVE(r4, 0x6, 0x23,
&(0x7f00000001c0)={&(0x7f0000ffb000/0x3000)=nil, 0x3000, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0}, &(0x7f0000000440)=0x40)
r6 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00',
0x181e42, 0x0)
Security readout for executives and security teams
Plain-English summary
A Linux TCP receive zero-copy flaw can mishandle file-backed memory pages and crash the kernel. A local, low-privileged user may trigger it without user interaction, potentially disrupting affected servers or workloads. The supplied evidence confirms a kernel panic, but not data theft or code execution.
Executive priority
Treat as a high-priority kernel maintenance issue, especially on systems allowing untrusted local users or workloads. Accelerate normal patching, but the supplied evidence does not justify claiming an active exploitation emergency.
Technical view
TCP receive zero-copy could map compound or filesystem-owned pages because can_map_frag() lacked required sanity checks. syzbot reproduced a panic by sending ext4-backed pages through loopback TCP using sendfile. The kernel fix rejects compound pages and requires page->mapping to be NULL.
Likely exposure
Exposure concerns Linux systems within the cited affected version ranges where a local low-privileged account can access the relevant TCP receive zero-copy behavior. Internet reachability alone is insufficient because the CVSS vector specifies local attack access.
Exploitation context
The supplied record is not in CISA KEV and provides no evidence of active exploitation. It documents a syzbot-generated local reproducer causing a kernel panic. CVSS 3.1 scores it 7.8 with low complexity, low privileges, and no user interaction.
Researcher notes
No CWE is supplied. The demonstrated outcome is a kernel panic involving ext4-backed pages entering TCP receive zero-copy. Although the CVSS vector assigns high confidentiality, integrity, and availability impacts, the bundle does not independently demonstrate data disclosure, modification, privilege escalation, or arbitrary code execution.
Mitigation direction
Install a vendor-supported kernel release containing the applicable referenced stable fix.
Reboot affected systems so the corrected kernel becomes active.
If patching is delayed, restrict untrusted local access and consult vendor guidance for supported workarounds.
Prioritize shared, multi-user, and untrusted-workload Linux hosts.
Validation and detection
Inventory active kernel versions and compare them with vendor advisories and the CVE record.
Confirm the running kernel contains the applicable referenced stable commit.
Verify the corrected kernel is active after reboot, not merely installed.
Review kernel logs and crash records for related TCP zero-copy panics.
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.
cve · low confidence lookup
CVE-2024-26640 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
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.