Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2021-47640

HIGH 7.8EPSS 16%

powerpc/kasan: Fix early region not updated correctly

Mitigation

  • Upgrade Linux to 5.4 or later.

Who should check

  • Anyone running Linux >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 7f19245c3647afea8c7c41f795506ef70f64b9f2; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < f39a3309393a4a484532f6ba745c6acbcfe06115; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 5a3d8f3192a409893c57808cc935e16484df1068; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < de56beace6648065d404cd9835aa7d30e3df519d; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < e3d157a4b4f4e0268c98be5b7013bf4b31234bb6; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < dd75080aa8409ce10d50fb58981c6b59bf8707d3; 3822dd8c102d11ada9d9ed8e04cad0b347a04689; >= 5.3.6, < 5.4
  • Anyone running Linux 5.4

Vulnerability facts

Affected
Linux >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 7f19245c3647afea8c7c41f795506ef70f64b9f2; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < f39a3309393a4a484532f6ba745c6acbcfe06115; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 5a3d8f3192a409893c57808cc935e16484df1068; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < de56beace6648065d404cd9835aa7d30e3df519d; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < e3d157a4b4f4e0268c98be5b7013bf4b31234bb6; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < dd75080aa8409ce10d50fb58981c6b59bf8707d3; 3822dd8c102d11ada9d9ed8e04cad0b347a04689; >= 5.3.6, < 5.4; Linux 5.4
Fixed in
Linux 7f19245c3647afea8c7c41f795506ef70f64b9f2, Linux 5a3d8f3192a409893c57808cc935e16484df1068, Linux 5.4
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 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
EPSS
0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
CWE
CWE-787
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: powerpc/kasan: Fix early region not updated correctly The shadow's page table is not updated when PTE_RPN_SHIFT is 24 and PAGE_SHIFT is 12. It not only causes false positives but also false negative as shown the following text. Fix it by bringing the logic of kasan_early_shadow_page_entry here. 1. False Positive: ================================================================== BUG: KASAN: vmalloc-out-of-bounds in pcpu_alloc+0x508/0xa50 Write of size 16 at addr f57f3be0 by task swapper/0/1 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-12267-gdebe436e77c7 #1 Call Trace: [c80d1c20] [c07fe7b8] dump_stack_lvl+0x4c/0x6c (unreliable) [c80d1c40] [c02ff668] print_address_description.constprop.0+0x88/0x300 [c80d1c70] [c02ff45c] kasan_report+0x1ec/0x200 [c80d1cb0] [c0300b20] kasan_check_range+0x160/0x2f0 [c80d1cc0] [c03018a4] memset+0x34/0x90 [c80d1ce0] [c0280108] pcpu_alloc+0x508/0xa50 [c80d1d40] [c02fd7bc] __kmem_cache_create+0xfc/0x570 [c80d1d70] [c0283d64] kmem_cache_create_usercopy+0x274/0x3e0 [c80d1db0] [c2036580] init_sd+0xc4/0x1d0 [c80d1de0] [c00044a0] do_one_initcall+0xc0/0x33c [c80d1eb0] [c2001624] kernel_init_freeable+0x2c8/0x384 [c80d1ef0] [c0004b14] kernel_init+0x24/0x170 [c80d1f10] [c001b26c] ret_from_kernel_thread+0x5c/0x64 Memory state around the buggy address: f57f3a80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f57f3b00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 >f57f3b80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ f57f3c00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f57f3c80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== 2. False Negative (with KASAN tests): ================================================================== Before fix: ok 45 - kmalloc_double_kzfree # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:1039 KASAN failure expected in "((volatile char *)area)[3100]", but none occurred not ok 46 - vmalloc_oob not ok 1 - kasan ================================================================== After fix: ok 1 - kasan

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 7f19245c3647afea8c7c41f795506ef70f64b9f2; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < f39a3309393a4a484532f6ba745c6acbcfe06115; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 5a3d8f3192a409893c57808cc935e16484df1068; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < de56beace6648065d404cd9835aa7d30e3df519d; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < e3d157a4b4f4e0268c98be5b7013bf4b31234bb6; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < dd75080aa8409ce10d50fb58981c6b59bf8707d3; 3822dd8c102d11ada9d9ed8e04cad0b347a04689; >= 5.3.6, < 5.4—cvelist
Linux5.4—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

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

Details: https://flawdb.com/CVE-2021-47640.md
Affected: Linux >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 7f19245c3647afea8c7c41f795506ef70f64b9f2; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < f39a3309393a4a484532f6ba745c6acbcfe06115; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 5a3d8f3192a409893c57808cc935e16484df1068; >= cbd18991e24fea2c31da3bb…
Fixed in: Linux 7f19245c3647afea8c7c41f795506ef70f64b9f2, Linux 5a3d8f3192a409893c57808cc935e16484df1068, Linux 5.4

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.

References

FAQ

Is CVE-2021-47640 being exploited?

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

How serious is CVE-2021-47640?

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

Which versions are affected by CVE-2021-47640?

Linux >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 7f19245c3647afea8c7c41f795506ef70f64b9f2; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < f39a3309393a4a484532f6ba745c6acbcfe06115; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < 5a3d8f3192a409893c57808cc935e16484df1068; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < de56beace6648065d404cd9835aa7d30e3df519d; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < e3d157a4b4f4e0268c98be5b7013bf4b31234bb6; >= cbd18991e24fea2c31da3bb117c83e4a3538cd11, < dd75080aa8409ce10d50fb58981c6b59bf8707d3; 3822dd8c102d11ada9d9ed8e04cad0b347a04689; >= 5.3.6, < 5.4; Linux 5.4.

Is there a fix for CVE-2021-47640?

Yes. Fixed in Linux 7f19245c3647afea8c7c41f795506ef70f64b9f2, Linux 5a3d8f3192a409893c57808cc935e16484df1068, Linux 5.4. Upgrade Linux to 5.4 or later.

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

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.

Sponsors