CVE-2021-47544: tcp: fix page frag corruption on page fault
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)
Security readout for executives and security teams
Plain-English summary
This Linux kernel flaw can corrupt TCP data in a narrow server-side pattern: serving memory-mapped files from a CIFS mount, such as Apache handling HTTP content backed by SMB/CIFS storage. Sources describe stream corruption, not confirmed remote code execution or privilege escalation.
Executive priority
Treat this as a targeted kernel maintenance issue, not a broad emergency from the supplied evidence. Prioritize servers that serve web or application data directly from CIFS mounts, especially where content integrity matters.
Technical view
The bug involves nested use of task page fragments during tcp_sendmsg. A page fault on mmapped CIFS-backed user memory can trigger an SMB transaction on another socket in the same process, modifying the page fragment used by the outer sendmsg and corrupting the TCP stream.
Likely exposure
Most likely exposure is Linux servers using affected kernels with applications that send TCP data from memory-mapped CIFS files. Web servers serving content from CIFS mounts are the clearest cited scenario. General Linux systems without this data path appear less exposed based on the provided evidence.
Exploitation context
CISA KEV status is false, and the source bundle provides no cited evidence of active exploitation. The described impact is operational data corruption under a specific kernel, filesystem, and socket interaction, with no public exploit status or attacker workflow provided in the sources.
Researcher notes
The affected-version data in the bundle is incomplete or flattened, so map exposure through distro advisories and kernel package changelogs. The root cause and fix direction are clear: prevent task page-frag reuse when allocation lacks __GFP_FS during this nested CIFS fault path.
Mitigation direction
Apply vendor Linux kernel updates that include the referenced stable fixes.
Verify distro backports rather than relying only on upstream version numbers.
Temporarily avoid serving memory-mapped CIFS-backed files on unpatched systems.
Monitor web responses and application logs for unexplained content corruption.
Check current vendor advisories for any additional mitigations.
Validation and detection
Inventory Linux hosts using CIFS mounts with web or TCP-serving workloads.
Identify kernel versions and package changelogs for the stable fix backport.
Review Apache or application configurations for memory-mapped CIFS file serving.
Test the affected data path in staging after patching.
Confirm no unexplained HTTP response corruption remains.
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-2021-47544 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.