Local KASAN bypass via stale shadow PTE
Published Feb 26, 2025 · Updated May 23, 2026
KASAN shadow-memory error in Linux 5.4 through 5.17.1 allows local users to evade detection of invalid vmalloc accesses. In arch/powerpc/mm/kasan/kasan_init_32.c, early shadow initialization leaves the page-table entry stale when PTE_RPN_SHIFT is 24 and PAGE_SHIFT is 12. The issue is limited to affected 32-bit PowerPC KASAN configurations; it produces false reports and suppresses detection of real vmalloc out-of-bounds accesses.
Summary
What happened
KASAN shadow-memory error in Linux 5.4 through 5.17.1 allows local users to evade detection of invalid vmalloc accesses. In arch/powerpc/mm/kasan/kasan_init_32.c, early shadow initialization leaves the page-table entry stale when PTE_RPN_SHIFT is 24 and PAGE_SHIFT is 12. The issue is limited to affected 32-bit PowerPC KASAN configurations; it produces false reports and suppresses detection of real vmalloc out-of-bounds accesses.
The record
- CVE
- CVE-2021-47640
- Published
- Feb 26, 2025
- Updated
- May 23, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-787
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Feb 26, 2025CVE publishedPublication date reported by the CVE source.
- May 23, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=3822dd8c102d11ada9d9ed8e04cad0b347a04689
- Affected versionversion=5.3.6 <5.4
- Affected versionversion=5.4
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <5a3d8f3192a409893c57808cc935e16484df1068
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <7f19245c3647afea8c7c41f795506ef70f64b9f2
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <dd75080aa8409ce10d50fb58981c6b59bf8707d3
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <de56beace6648065d404cd9835aa7d30e3df519d
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <e3d157a4b4f4e0268c98be5b7013bf4b31234bb6
- Affected versionversion=cbd18991e24fea2c31da3bb117c83e4a3538cd11 <f39a3309393a4a484532f6ba745c6acbcfe06115
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo