🔍 CVE-2026-40290

7.8
CVSS Score
HIGH
2026-06-03
2026-07-21 19:10
✅ 완료

🇰🇷 한글 설명

OP-TEE의 FF-A 공유 메모리 해제 로직에서 사용자 후 해제(UAF) 레이스 컨디션 취약점이 발견되었습니다. CFG_SECURE_PARTITION이 활성화된 환경에서 sp_mem_remove() 함수가 전역 잠금을 획득하지 않고 메모리를 해제하여 발생합니다. 이로 인해 다른 스레드가 해제된 메모리 포인터를 참조할 때 시스템 불안정성이나 권한 상승이 발생할 수 있습니다.

💡 쉬운 설명

여러 작업이 동시에 메모리를 정리하고 사용할 때, 이미 삭제된 메모리 주소를 계속 사용하려고 시도하여 발생하는 오류입니다. 이로 인해 보안 시스템이 오작동하거나 해커가 시스템 제어권을 얻을 위험이 있습니다.

🇺🇸 원문 (English)

OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. Starting in version 3.16.0 and prior to 4.11.0, a user-after-free (UAF) race condition exists in the shared memory teardown logic of FF-A within OP-TEE SPMC/SP flows. This only applies when OP-TEE is configured as an SPMC for S-EL0 SPs, that is, with `CFG_SECURE_PARTITION=y`. The function `sp_mem_remove()`, responsible for freeing entries in `smem->receivers` and `smem->regions`, fails to acquire the global `sp_mem_lock` before performing the `free()` operations. Concurrently, other code paths, such as `sp_mem_get_receiver()`, iterate over these same lists without holding a lock, or, like `sp_mem_is_shared()`, iterate while holding the lock but are not serialized against the unprotected `free()` in `sp_mem_remove()`. This creates a cross-thread race where a thread iterating the list can acquire a pointer to an entry (e.g., `struct sp_mem_map_region` or `struct sp_mem_receiver`), and then another thread calls `sp_mem_remove()`, freeing the object. When the first thread resumes and dereferences the pointer, it results in a Use-After-Free vulnerability. Version 4.11.0 fixes the issue.

📍 영향받는 시스템

OP-TEE version 3.16.0 to 4.10.x (CFG_SECURE_PARTITION=y 설정 시)

⚔️ 공격 벡터

공유 메모리 관리 프로세스 간의 레이스 컨디션을 유도하여 해제된 메모리 영역에 접근

🛡️ 대응 방법

OP-TEE를 버전 4.11.0 이상으로 업데이트하십시오.

🔧 검증 코드

명령어 결과에 3.16.0~3.19.x 또는 4.0.0~4.10.x 버전이 포함되어 있으면 취약한 상태입니다.

Shell / Script
optee_version_cmd | grep -E '3\.(1[6-9])|4\.(0[0-9])'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel