tcp: fix page frag corruption on page fault
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 9 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.
Summary
In the Linux kernel, the following vulnerability has been resolved: tcp: fix page frag corruption on page fault Steffen reported a TCP stream corruption for HTTP requests served by the apache web-server using a cifs mount-point and memory mapping the relevant file. The root cause is quite similar to the one addressed by commit 20eb4f29b602 ("net: fix sk_page_frag() recursion from memory reclaim"). Here the nested access to the task page frag is caused by a page fault on the (mmapped) user-space memory buffer coming from the cifs file. The page fault handler performs an smb transaction on a different socket, inside the same process context. Since sk->sk_allaction for such socket does not prevent the usage for the task_frag, the nested allocation modify "under the hood" the page frag in use by the outer sendmsg call, corrupting the stream. The overall relevant stack trace looks like the following: httpd 78268 [001] 3461630.850950: probe:tcp_sendmsg_locked: ffffffff91461d91 tcp_sendmsg_locked+0x1 ffffffff91462b57 tcp_sendmsg+0x27 ffffffff9139814e sock_sendmsg+0x3e ffffffffc06dfe1d smb_send_kvec+0x28 [...] ffffffffc06cfaf8 cifs_readpages+0x213 ffffffff90e83c4b read_pages+0x6b ffffffff90e83f31 __do_page_cache_readahead+0x1c1 ffffffff90e79e98 filemap_fault+0x788 ffffffff90eb0458 __do_fault+0x38 ffffffff90eb5280 do_fault+0x1a0 ffffffff90eb7c84 __handle_mm_fault+0x4d4 ffffffff90eb8093 handle_mm_fault+0xc3 ffffffff90c74f6d __do_page_fault+0x1ed ffffffff90c75277 do_page_fault+0x37 ffffffff9160111e page_fault+0x1e ffffffff9109e7b5 copyin+0x25 ffffffff9109eb40 _copy_from_iter_full+0xe0 ffffffff91462370 tcp_sendmsg_locked+0x5e0 ffffffff91462370 tcp_sendmsg_locked+0x5e0 ffffffff91462b57 tcp_sendmsg+0x27 ffffffff9139815c sock_sendmsg+0x4c ffffffff913981f7 sock_write_iter+0x97 ffffffff90f2cc56 do_iter_readv_writev+0x156 ffffffff90f2dff0 do_iter_write+0x80 ffffffff90f2e1c3 vfs_writev+0xa3 ffffffff90f2e27c do_writev+0x5c ffffffff90c042bb do_syscall_64+0x5b ffffffff916000ad entry_SYSCALL_64_after_hwframe+0x65 The cifs filesystem rightfully sets sk_allocations to GFP_NOFS, we can avoid the nesting using the sk page frag for allocation lacking the __GFP_FS flag. Do not define an additional mm-helper for that, as this is strictly tied to the sk page frag usage. v1 -> v2: - use a stricted sk_page_frag() check instead of reordering the code (Eric)
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 3.7 and later | 5.10.84, 5.15.7, 5.16 | Patch available | CNA |
- Linux VendorLinux Affected 3.7 and later Fixed in 5.10.84, 5.15.7, 5.16 Patch available CNA
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.7 to before 5.10.84; 5.11 to before 5.15.7 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* | 5.16 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* | 5.16 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* | 5.16 rc3 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 3.7 to before 5.10.84; 5.11 to before 5.15.7 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* Versions 5.16 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* Versions 5.16 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* Versions 5.16 rc3 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.10.84, 5.15.7, 5.16
Red Hat 4 advisories
- RHSA-2023:0395 Released 2023-01-24 · Red Hat rating Importantkernel security and bug fix update
- Red Hat Enterprise Linux BaseOS AUS (v. 8.2) bpftool-4.18.0-193.98.1.el8_2, kernel-4.18.0-193.98.1.el8_2, kernel-abi-whitelists-4.18.0-193.98.1.el8_2 +14
- Red Hat Enterprise Linux BaseOS E4S (v. 8.2) bpftool-4.18.0-193.98.1.el8_2, kernel-4.18.0-193.98.1.el8_2, kernel-abi-whitelists-4.18.0-193.98.1.el8_2 +14
- Red Hat Enterprise Linux BaseOS TUS (v. 8.2) bpftool-4.18.0-193.98.1.el8_2, kernel-4.18.0-193.98.1.el8_2, kernel-abi-whitelists-4.18.0-193.98.1.el8_2 +14
- RHSA-2022:1988 Released 2022-05-10 · Red Hat rating Importantkernel security, bug fix, and enhancement update
- Red Hat Enterprise Linux BaseOS (v. 8) bpftool-4.18.0-372.9.1.el8, kernel-4.18.0-372.9.1.el8, kernel-abi-stablelists-4.18.0-372.9.1.el8 +19
- Red Hat Enterprise Linux CRB (v. 8) kernel-tools-libs-devel-4.18.0-372.9.1.el8
- RHSA-2022:1975 Released 2022-05-10 · Red Hat rating Importantkernel-rt security and bug fix update
- Red Hat Enterprise Linux NFV (v. 8) kernel-rt-4.18.0-372.9.1.rt7.166.el8, kernel-rt-core-4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-4.18.0-372.9.1.rt7.166.el8 +9
- Red Hat Enterprise Linux RT (v. 8) kernel-rt-4.18.0-372.9.1.rt7.166.el8, kernel-rt-core-4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-4.18.0-372.9.1.rt7.166.el8 +7
Show 1 more Red Hat advisories
- RHSA-2022:0777 Released 2022-03-08 · Red Hat rating Importantkernel security, bug fix, and enhancement update
- Red Hat Enterprise Linux BaseOS EUS (v.8.4) bpftool-4.18.0-305.40.1.el8_4, kernel-4.18.0-305.40.1.el8_4, kernel-abi-stablelists-4.18.0-305.40.1.el8_4 +19
- Red Hat Enterprise Linux CRB EUS (v.8.4) kernel-tools-libs-devel-4.18.0-305.40.1.el8_4
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2022:1988 |
| Red Hat Enterprise Linux BaseOS AUS (v. 8.2) | Fixed | RHSA-2023:0395 |
| Red Hat Enterprise Linux BaseOS E4S (v. 8.2) | Fixed | RHSA-2023:0395 |
| Red Hat Enterprise Linux BaseOS EUS (v.8.4) | Fixed | RHSA-2022:0777 |
| Red Hat Enterprise Linux BaseOS TUS (v. 8.2) | Fixed | RHSA-2023:0395 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2022:1988 |
| Red Hat Enterprise Linux CRB EUS (v.8.4) | Fixed | RHSA-2022:0777 |
| Red Hat Enterprise Linux NFV (v. 8) | Fixed | RHSA-2022:1975 |
| Red Hat Enterprise Linux RT (v. 8) | Fixed | RHSA-2022:1975 |
Not affected: 1 product
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2021-47544
References
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2021-47544 · CVE Program
- CVE-2021-47544 · NVD
- FIRST EPSS
- CVE-2021-47544 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences