CVE-2021-47544: Vulnerability in Linux Linux
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)
AI Analysis
Technical Summary
CVE-2021-47544 is a vulnerability in the Linux kernel's TCP stack that causes corruption of TCP streams under specific conditions involving the CIFS filesystem and memory-mapped files. The root cause lies in the handling of page fragments (page frags) during page faults triggered by memory-mapped user-space buffers backed by CIFS mounts. When an HTTP request is served by the Apache web server using a CIFS-mounted file that is memory-mapped, a page fault handler initiates an SMB transaction on a different socket within the same process context. This nested socket operation leads to recursive access and modification of the task's page fragment structure (task page frag) without proper protection, resulting in corruption of the TCP stream data being sent. The vulnerability is related to a previously addressed issue (commit 20eb4f29b602) involving recursion in sk_page_frag() during memory reclaim. The Linux kernel's CIFS filesystem sets socket allocations with GFP_NOFS to avoid filesystem recursion, but the nested allocation in this case lacks the __GFP_FS flag, allowing the corruption to occur. The patch involves stricter checks in sk_page_frag() usage to prevent nested allocations that modify the page frag in use. The vulnerability affects Linux kernel versions identified by the commit hash 5640f7685831e088fe6c2e1f863a6805962f8e81 and was published on May 24, 2024. No known exploits are reported in the wild. This vulnerability specifically impacts network communication integrity when using CIFS mounts with memory-mapped files in TCP streams, such as HTTP traffic served by Apache. The technical complexity and specific conditions required limit the attack surface but pose a risk of data corruption and potential denial of service in affected environments.
Potential Impact
For European organizations, this vulnerability could disrupt critical services that rely on Linux servers using CIFS mounts with memory-mapped files, particularly those serving HTTP content via Apache. The corruption of TCP streams can lead to data integrity issues, causing application errors, corrupted responses, or dropped connections. This can degrade service availability and reliability, impacting business operations, customer experience, and potentially leading to data loss or retransmission overhead. Organizations using CIFS to integrate Windows file shares with Linux-based web servers or applications are most at risk. Given the prevalence of Linux in European data centers, cloud environments, and enterprise infrastructure, especially in sectors like finance, telecommunications, and public administration, the vulnerability could affect critical infrastructure. However, exploitation requires specific configurations and workloads, somewhat limiting widespread impact. Still, any disruption in web services or internal file sharing could have cascading effects on operational continuity and trust. Additionally, the vulnerability could be leveraged in targeted attacks aiming to cause denial of service or data corruption in sensitive environments.
Mitigation Recommendations
European organizations should apply the Linux kernel patch that addresses CVE-2021-47544 as soon as it becomes available from their Linux distribution vendors. Until patched, organizations should audit their use of CIFS mounts combined with memory-mapped files, especially in web server contexts like Apache. Where possible, avoid memory-mapping files served over CIFS or disable CIFS mounts for critical HTTP content delivery. Network segmentation and strict access controls should be enforced to limit exposure of vulnerable services. Monitoring for unusual TCP stream errors or application-level corruption can help detect exploitation attempts. Additionally, organizations should review kernel configurations and socket allocation flags to ensure they align with best practices to prevent nested page frag allocations. Testing updates in staging environments before deployment is recommended to avoid service disruptions. Finally, maintain up-to-date backups and incident response plans to mitigate potential impacts from service interruptions or data corruption.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Poland
CVE-2021-47544: Vulnerability in Linux Linux
Description
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)
AI-Powered Analysis
Technical Analysis
CVE-2021-47544 is a vulnerability in the Linux kernel's TCP stack that causes corruption of TCP streams under specific conditions involving the CIFS filesystem and memory-mapped files. The root cause lies in the handling of page fragments (page frags) during page faults triggered by memory-mapped user-space buffers backed by CIFS mounts. When an HTTP request is served by the Apache web server using a CIFS-mounted file that is memory-mapped, a page fault handler initiates an SMB transaction on a different socket within the same process context. This nested socket operation leads to recursive access and modification of the task's page fragment structure (task page frag) without proper protection, resulting in corruption of the TCP stream data being sent. The vulnerability is related to a previously addressed issue (commit 20eb4f29b602) involving recursion in sk_page_frag() during memory reclaim. The Linux kernel's CIFS filesystem sets socket allocations with GFP_NOFS to avoid filesystem recursion, but the nested allocation in this case lacks the __GFP_FS flag, allowing the corruption to occur. The patch involves stricter checks in sk_page_frag() usage to prevent nested allocations that modify the page frag in use. The vulnerability affects Linux kernel versions identified by the commit hash 5640f7685831e088fe6c2e1f863a6805962f8e81 and was published on May 24, 2024. No known exploits are reported in the wild. This vulnerability specifically impacts network communication integrity when using CIFS mounts with memory-mapped files in TCP streams, such as HTTP traffic served by Apache. The technical complexity and specific conditions required limit the attack surface but pose a risk of data corruption and potential denial of service in affected environments.
Potential Impact
For European organizations, this vulnerability could disrupt critical services that rely on Linux servers using CIFS mounts with memory-mapped files, particularly those serving HTTP content via Apache. The corruption of TCP streams can lead to data integrity issues, causing application errors, corrupted responses, or dropped connections. This can degrade service availability and reliability, impacting business operations, customer experience, and potentially leading to data loss or retransmission overhead. Organizations using CIFS to integrate Windows file shares with Linux-based web servers or applications are most at risk. Given the prevalence of Linux in European data centers, cloud environments, and enterprise infrastructure, especially in sectors like finance, telecommunications, and public administration, the vulnerability could affect critical infrastructure. However, exploitation requires specific configurations and workloads, somewhat limiting widespread impact. Still, any disruption in web services or internal file sharing could have cascading effects on operational continuity and trust. Additionally, the vulnerability could be leveraged in targeted attacks aiming to cause denial of service or data corruption in sensitive environments.
Mitigation Recommendations
European organizations should apply the Linux kernel patch that addresses CVE-2021-47544 as soon as it becomes available from their Linux distribution vendors. Until patched, organizations should audit their use of CIFS mounts combined with memory-mapped files, especially in web server contexts like Apache. Where possible, avoid memory-mapping files served over CIFS or disable CIFS mounts for critical HTTP content delivery. Network segmentation and strict access controls should be enforced to limit exposure of vulnerable services. Monitoring for unusual TCP stream errors or application-level corruption can help detect exploitation attempts. Additionally, organizations should review kernel configurations and socket allocation flags to ensure they align with best practices to prevent nested page frag allocations. Testing updates in staging environments before deployment is recommended to avoid service disruptions. Finally, maintain up-to-date backups and incident response plans to mitigate potential impacts from service interruptions or data corruption.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-24T15:02:54.829Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9833c4522896dcbe940a
Added to database: 5/21/2025, 9:09:07 AM
Last enriched: 6/30/2025, 2:27:32 PM
Last updated: 8/12/2025, 3:50:15 PM
Views: 16
Related Threats
Researcher to release exploit for full auth bypass on FortiWeb
HighCVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.