Arbitrary memory reads via unvalidated key blobs
Published Sep 16, 2022 · Updated Aug 4, 2024
Improper key validation in Huawei EMUI 11.0.1 and 12.0.0 and HarmonyOS 2.0 allows attackers to read arbitrary HW_KEYMASTER memory. The cmd_unwrap path accepts attacker-chosen key material and aliases, writes a crafted key blob into secure storage, and later trusts attacker-controlled offsets and lengths during a memory copy. The demonstrated path requires impersonating a whitelisted client through a modified kernel and yields arbitrary reads within the TrustZone trusted application.
Summary
What happened
Improper key validation in Huawei EMUI 11.0.1 and 12.0.0 and HarmonyOS 2.0 allows attackers to read arbitrary HW_KEYMASTER memory. The cmd_unwrap path accepts attacker-chosen key material and aliases, writes a crafted key blob into secure storage, and later trusts attacker-controlled offsets and lengths during a memory copy. The demonstrated path requires impersonating a whitelisted client through a modified kernel and yields arbitrary reads within the TrustZone trusted application.
The record
- CVE
- CVE-2021-40017
- Published
- Sep 16, 2022
- Updated
- Aug 4, 2024
- Vendor
- Unknown vendor
- Product
- Unknown product
- Classifications
- CWE-20, T1068
- Attack vector
- local
- Privileges
- admin
Timeline
How it unfolded
- Sep 16, 2022CVE publishedPublication date reported by the CVE source.
- Aug 4, 2024Record 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?
What conditions does exploitation require?
What is affected?
Affected products and versions are unavailable in this record.
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
- HW_KEYMASTER arbitrary-read proof of conceptproof of concept · demonstrated
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