# CVE-2021-47544: tcp: fix page frag corruption on page fault

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.27% (percentile 70, 2026-11-26)
- **Published:** 2024-05-24T15:09:49.895Z
- **Modified:** 2026-08-05T08:48:19.884Z

## Who should check

- Anyone running Linux \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< c6f340a331fb72e5ac23a083de9c780e132ca3ae; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< dacb5d8875cc6cd3a553363b4d6f06760fcbe70c
- Anyone running Linux 3.7

## 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)

## Affected and fixed versions

- Linux: \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< c6f340a331fb72e5ac23a083de9c780e132ca3ae; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< dacb5d8875cc6cd3a553363b4d6f06760fcbe70c (cvelist)
- Linux: 3.7 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47544. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47544.md
Affected: Linux >= 5640f7685831e088fe6c2e1f863a6805962f8e81, < c6f340a331fb72e5ac23a083de9c780e132ca3ae; >= 5640f7685831e088fe6c2e1f863a6805962f8e81, < 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc; >= 5640f7685831e088fe6c2e1f863a6805962f8e81, < dacb5d8875cc6cd3a553363b4d6f06760fcbe70c; Linux 3.7
Fixed in: Linux 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47544 being exploited?

There is no confirmed exploitation: CVE-2021-47544 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47544?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2021-47544?

Linux \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< c6f340a331fb72e5ac23a083de9c780e132ca3ae; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc; \>= 5640f7685831e088fe6c2e1f863a6805962f8e81, \< dacb5d8875cc6cd3a553363b4d6f06760fcbe70c; Linux 3.7.

### Is there a fix for CVE-2021-47544?

Yes. Fixed in Linux 5a9afcd827cafe14a95c9fcbded2c2d104f18dfc. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47544?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c6f340a331fb72e5ac23a083de9c780e132ca3ae>
- patch: <https://git.kernel.org/stable/c/5a9afcd827cafe14a95c9fcbded2c2d104f18dfc>
- patch: <https://git.kernel.org/stable/c/dacb5d8875cc6cd3a553363b4d6f06760fcbe70c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47544>

HTML: <https://flawdb.com/CVE-2021-47544> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47544>
