Local privilege escalation via unchecked metadata copy
Published Mar 7, 2023 · Updated Aug 3, 2024
Classic buffer overflow in Qualcomm Snapdragon firmware loading allows local users to elevate privileges via a crafted firmware image. The qcom_mdt_read_metadata function in drivers/soc/qcom/mdt_loader.c trusts firmware-derived ELF header and hash lengths when copying metadata into a kernel buffer. Exploitation requires local access to trigger the peripheral image loader on an affected Snapdragon Mobile or Wearables chipset, and successful corruption can grant elevated control or crash the device.
Summary
What happened
Classic buffer overflow in Qualcomm Snapdragon firmware loading allows local users to elevate privileges via a crafted firmware image. The qcom_mdt_read_metadata function in drivers/soc/qcom/mdt_loader.c trusts firmware-derived ELF header and hash lengths when copying metadata into a kernel buffer. Exploitation requires local access to trigger the peripheral image loader on an affected Snapdragon Mobile or Wearables chipset, and successful corruption can grant elevated control or crash the device.
The record
- CVE
- CVE-2022-40540
- Published
- Mar 7, 2023
- Updated
- Aug 3, 2024
- Vendor
- Qualcomm
- Product
- Snapdragon
- Classifications
- CWE-120, T1068
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 7, 2023CVE publishedPublication date reported by the CVE source.
- Aug 3, 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?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=SD888 5G
- Affected versionversion=SD 8 Gen1 5G
- Affected versionversion=SW5100
- Affected versionversion=SW5100P
- Affected versionversion=WCD9380
- Affected versionversion=WCD9385
- Affected versionversion=WCN3980
- Affected versionversion=WCN3988
- Affected versionversion=WCN6850
- Affected versionversion=WCN6851
- Affected versionversion=WCN6855
- Affected versionversion=WCN6856
- Affected versionversion=WCN7850
- Affected versionversion=WCN7851
- Affected versionversion=WSA8830
- Affected versionversion=WSA8835
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