A vulnerability in OP-TEE Trusted OS prior to version 3.19.0 exists due to improper validation of the array index in the cleanup_shm_refs() function. This function, invoked by entry_invoke_command() and entry_open_session(), does not properly validate the num_params argument, which can be controlled by a normal-world attacker via a crafted SMC call. This leads to out-of-bounds reads and potentially the freeing of fake objects in mobj_put(), enabling a local privilege escalation from the normal world to the secure world.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
Repository purpose: a reproducible QEMU v8 environment plus a local PoC to trigger CVE-2022-46152 in OP-TEE OS (<3.19.0). The vulnerability is an improper validation of num_params in core/tee/entry_std.c: entry_invoke_command() calls cleanup_shm_refs() with attacker-controlled num_params even when copy_in_params() rejects it, causing cleanup_shm_refs() to read beyond saved_attr[TEE_NUM_PARAMS=4] on the secure-world stack. This yields an out-of-bounds read of secure-world stack data and, if residual stack values match TMEM/RMEM attribute constants, can drive mobj_put() on attacker-influenced params leading to UAF/heap corruption. Key files/structure: - poc/cve_2022_46152.c: main PoC. Opens /dev/tee0, opens a session to the Hello World TA (hardcoded UUID 8aaaf200-2450-11e4-abe2-0002a5d5c51b), then issues TEE_IOC_INVOKE with num_params=31 (chosen because Linux TEE ioctl buffer limit TEE_MAX_ARG_SIZE=1024 caps params to 31). This bypasses libteec’s 4-parameter limit and triggers the secure-world OOB path. - exploit.sh: automation wrapper using expect to boot QEMU, log in as root, run /root/cve_2022_46152, and capture logs. It also starts a simple TCP server bound to 127.0.0.1:54321 to capture secure-world UART output. - run_qemu.sh: launches the OP-TEE QEMU v8 VM with two serial TCP endpoints: 54320 (Normal World console) and 54321 (Secure World log). Optionally exposes a GDB server on 1234. - setup.sh: fetches/builds the full OP-TEE QEMU v8 stack at tag 3.18.0 (vulnerable), builds the PoC with aarch64-linux-gnu-gcc, and injects it into the Buildroot overlay so it appears as /root/cve_2022_46152 in the guest. - docs/vulnerability_analysis.md: detailed root-cause and exploitation notes. - cve-2022-46152-oob-emsg.patch: debug-only patch adding an explicit EMSG() warning when num_params > TEE_NUM_PARAMS to make triggering visible on secure-world UART (not the real fix). - qemu-pflash-suppress-unimp-log.patch: cosmetic QEMU patch to suppress noisy pflash warnings. Overall capability: local (Normal World) trigger of a secure-world memory safety bug via crafted TEE ioctl messages; primarily a reproduction/PoC environment rather than a full weaponized exploit (no stable info-leak or controlled code execution chain included).
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.