CVE-2021-47256 json
mm/memory-failure: make sure wait for page writeback in memory_failure
published 2024-05-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-33904
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 14%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
mm/memory-failure: make sure wait for page writeback in memory_failure
Our syzkaller trigger the "BUG_ON(!list_empty(&inode->i_wb_list))" in clear_inode:
kernel BUG at fs/inode.c:519! Internal error: Oops - BUG: 0 [#1] SMP Modules linked in: Process syz-executor.0 (pid: 249, stack limit = 0x00000000a12409d7) CPU: 1 PID: 249 Comm: syz-executor.0 Not tainted 4.19.95 Hardware name: linux,dummy-virt (DT) pstate: 80000005 (Nzcv daif -PAN -UAO) pc : clear_inode+0x280/0x2a8 lr : clear_inode+0x280/0x2a8 Call trace: clear_inode+0x280/0x2a8 ext4_clear_inode+0x38/0xe8 ext4_free_inode+0x130/0xc68 ext4_evict_inode+0xb20/0xcb8 evict+0x1a8/0x3c0 iput+0x344/0x460 do_unlinkat+0x260/0x410 __arm64_sys_unlinkat+0x6c/0xc0 el0_svc_common+0xdc/0x3b0 el0_svc_handler+0xf8/0x160 el0_svc+0x10/0x218 Kernel panic - not syncing: Fatal exception
A crash dump of this problem show that someone called __munlock_pagevec to clear page LRU without lock_page: do_mmap -> mmap_region -> do_munmap -> munlock_vma_pages_range -> __munlock_pagevec.
As a result memory_failure will call identify_page_state without wait_on_page_writeback. And after truncate_error_page clear the mapping of this page. end_page_writeback won't call sb_clear_inode_writeback to clear inode->i_wb_list. That will trigger BUG_ON in clear_inode!
Fix it by checking PageWriteback too to help determine should we skip wait_on_page_writeback.
Patch / fix
- Linux Linux 4.14.238, 4.19.196, 5.4.128, 5.10.46, 5.12.13, 5.13
- linux Debian 14, Debian 13, Debian 12 5.10.46-1
debian advisories DEBIAN-CVE-2021-47256
- linux Ubuntu 18.04 LTS 4.15.0-156.163
- linux Ubuntu 20.04 LTS 5.4.0-81.91
- linux-aws Ubuntu 18.04 LTS 4.15.0-1111.118
- linux-aws Ubuntu 20.04 LTS 5.4.0-1055.58
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1051.55
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1099.101
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1045.47
- linux-azure Ubuntu 20.04 LTS 5.4.0-1056.58
ubuntu advisories UBUNTU-CVE-2021-47256
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/d05267fd27a5c4f54e06daefa3035995d765ca0c commit
- git.kernel.org/stable/c/6d210d547adc2218ef8b5bcf23518c5f2f1fd872 commit
- git.kernel.org/stable/c/566345aaabac853aa866f53a219c4b02a6beb527 commit
- git.kernel.org/stable/c/9e379da727a7a031be9b877cde7b9c34a0fb8306 commit
- git.kernel.org/stable/c/28788dc5c70597395b6b451dae4549bbaa8e2c56 commit
- git.kernel.org/stable/c/e8675d291ac007e1c636870db880f837a9ea112a commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47256 updated cvss 5.5
kernel: mm/memory-failure: make sure wait for page writeback in memory_failure
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: workaround, no fix planned “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/d05267fd27a5c4f54e06daefa3035995d765ca0c
patch
-
git.kernel.org
/stable/c/6d210d547adc2218ef8b5bcf23518c5f2f1fd872
patch
-
git.kernel.org
/stable/c/566345aaabac853aa866f53a219c4b02a6beb527
patch
-
git.kernel.org
/stable/c/9e379da727a7a031be9b877cde7b9c34a0fb8306
patch
-
git.kernel.org
/stable/c/28788dc5c70597395b6b451dae4549bbaa8e2c56
patch
-
git.kernel.org
/stable/c/e8675d291ac007e1c636870db880f837a9ea112a
patch
Sources
- CVE List CVE-2021-47256
- NVD CVE-2021-47256
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.