# CVE-2021-47492: mm, thp: bail out early in collapse\_file for writeback page

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-28)
- **Published:** 2024-05-22T08:19:40.759Z
- **Modified:** 2026-08-05T08:48:02.710Z

## Who should check

- Anyone running Linux \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 69a7fa5cb0de06c8956b040f19a7248c8c8308ca; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 5e669d8ab30ab61dec3c36e27b4711f07611e6fc; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 74c42e1baacf206338b1dd6b6199ac964512b5bb
- Anyone running Linux 5.4

## Description

In the Linux kernel, the following vulnerability has been resolved:

mm, thp: bail out early in collapse\_file for writeback page

Currently collapse\_file does not explicitly check PG\_writeback, instead,
page\_has\_private and try\_to\_release\_page are used to filter writeback
pages.  This does not work for xfs with blocksize equal to or larger
than pagesize, because in such case xfs has no page-\>private.

This makes collapse\_file bail out early for writeback page.  Otherwise,
xfs end\_page\_writeback will panic as follows.

  page:fffffe00201bcc80 refcount:0 mapcount:0 mapping:ffff0003f88c86a8 index:0x0 pfn:0x84ef32
  aops:xfs\_address\_space\_operations \[xfs\] ino:30000b7 dentry name:"libtest.so"
  flags: 0x57fffe0000008027(locked\|referenced\|uptodate\|active\|writeback)
  raw: 57fffe0000008027 ffff80001b48bc28 ffff80001b48bc28 ffff0003f88c86a8
  raw: 0000000000000000 0000000000000000 00000000ffffffff ffff0000c3e9a000
  page dumped because: VM\_BUG\_ON\_PAGE(((unsigned int) page\_ref\_count(page) + 127u \<= 127u))
  page-\>mem\_cgroup:ffff0000c3e9a000
  ------------\[ cut here \]------------
  kernel BUG at include/linux/mm.h:1212!
  Internal error: Oops - BUG: 0 \[\#1\] SMP
  Modules linked in:
  BUG: Bad page state in process khugepaged  pfn:84ef32
   xfs(E)
  page:fffffe00201bcc80 refcount:0 mapcount:0 mapping:0 index:0x0 pfn:0x84ef32
   libcrc32c(E) rfkill(E) aes\_ce\_blk(E) crypto\_simd(E) ...
  CPU: 25 PID: 0 Comm: swapper/25 Kdump: loaded Tainted: ...
  pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--)
  Call trace:
    end\_page\_writeback+0x1c0/0x214
    iomap\_finish\_page\_writeback+0x13c/0x204
    iomap\_finish\_ioend+0xe8/0x19c
    iomap\_writepage\_end\_bio+0x38/0x50
    bio\_endio+0x168/0x1ec
    blk\_update\_request+0x278/0x3f0
    blk\_mq\_end\_request+0x34/0x15c
    virtblk\_request\_done+0x38/0x74 \[virtio\_blk\]
    blk\_done\_softirq+0xc4/0x110
    \_\_do\_softirq+0x128/0x38c
    \_\_irq\_exit\_rcu+0x118/0x150
    irq\_exit+0x1c/0x30
    \_\_handle\_domain\_irq+0x8c/0xf0
    gic\_handle\_irq+0x84/0x108
    el1\_irq+0xcc/0x180
    arch\_cpu\_idle+0x18/0x40
    default\_idle\_call+0x4c/0x1a0
    cpuidle\_idle\_call+0x168/0x1e0
    do\_idle+0xb4/0x104
    cpu\_startup\_entry+0x30/0x9c
    secondary\_start\_kernel+0x104/0x180
  Code: d4210000 b0006161 910c8021 94013f4d (d4210000)
  ---\[ end trace 4a88c6a074082f8c \]---
  Kernel panic - not syncing: Oops - BUG: Fatal exception in interrupt

## Affected and fixed versions

- Linux: \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 69a7fa5cb0de06c8956b040f19a7248c8c8308ca; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 5e669d8ab30ab61dec3c36e27b4711f07611e6fc; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 74c42e1baacf206338b1dd6b6199ac964512b5bb (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- Upgrade Linux to 74c42e1baacf206338b1dd6b6199ac964512b5bb or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-47492.md
Affected: Linux >= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 69a7fa5cb0de06c8956b040f19a7248c8c8308ca; >= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 5e669d8ab30ab61dec3c36e27b4711f07611e6fc; >= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 74c42e1baacf206338b1dd6b6199ac964512b5bb; Linux 5.4
Fixed in: Linux 69a7fa5cb0de06c8956b040f19a7248c8c8308ca, Linux 5e669d8ab30ab61dec3c36e27b4711f07611e6fc, Linux 74c42e1baacf206338b1dd6b6199ac964512b5bb

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-47492 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 69a7fa5cb0de06c8956b040f19a7248c8c8308ca; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 5e669d8ab30ab61dec3c36e27b4711f07611e6fc; \>= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, \< 74c42e1baacf206338b1dd6b6199ac964512b5bb; Linux 5.4.

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

Yes. Fixed in Linux 69a7fa5cb0de06c8956b040f19a7248c8c8308ca, Linux 5e669d8ab30ab61dec3c36e27b4711f07611e6fc, Linux 74c42e1baacf206338b1dd6b6199ac964512b5bb. Upgrade Linux to 74c42e1baacf206338b1dd6b6199ac964512b5bb or later.

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

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/69a7fa5cb0de06c8956b040f19a7248c8c8308ca>
- patch: <https://git.kernel.org/stable/c/5e669d8ab30ab61dec3c36e27b4711f07611e6fc>
- patch: <https://git.kernel.org/stable/c/74c42e1baacf206338b1dd6b6199ac964512b5bb>

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

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