🇰🇷 한글 설명
OP-TEE(Arm TrustZone 기반 신뢰 실행 환경) 3.8.0부터 4.10까지의 버전에서, RSA 서명 패딩 계산 시 정수 언더플로우가 발생합니다. 작은 모듈러스 키를 선택하면 memset() 호출이 범위를 넘어 메모리를 덮어쓰게 되어 OP-TEE가 충돌합니다. 이 취약점은 RSA 가속을 등록한 플랫폼에만 영향을 줍니다.
💡 쉬운 설명
보안 영역(TEE)에서 RSA 서명을 처리할 때 계산 오류가 생겨 메모리가 잘못 쓰이는 문제입니다. 공격자가 특정 작은 키를 사용하면 보안 시스템이 멈추거나 비정상 동작할 수 있습니다.
🇺🇸 원문 (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. From 3.8.0 to 4.10, in the function emsa_pkcs1_v1_5_encode() in core/drivers/crypto/crypto_api/acipher/rsassa.c, the amount of padding needed, "PS size", is calculated by subtracting the size of the digest and other fields required for the EMA-PKCS1-v1_5 encoding from the size of the modulus of the key. By selecting a small enough modulus, this subtraction can overflow. The padding is added as a string of 0xFF bytes with a call to memset(), and an underflowed integer will cause the memset() call to overwrite until OP-TEE crashes. This only affects platforms registering RSA acceleration.
📍 영향받는 시스템
OP-TEE 3.8.0 이상 4.10 이하 버전 중 RSA 가속을 등록한 Arm Cortex-A 플랫폼
⚔️ 공격 벡터
공격자가 작은 모듈러스를 가진 RSA 키로 서명 연산을 요청하여 패딩 크기 계산에서 언더플로우를 유발함
🛡️ 대응 방법
OP-TEE를 4.10 초과의 패치된 버전으로 업데이트하거나 해당 버전의 보안 패치를 적용
🔧 검증 코드
출력된 버전이 3.8.0 이상 4.10 이하이면 취약하므로 패치가 필요하며, 4.10 초과이면 이 취약점에 해당하지 않습니다. 버전 정보가 나오지 않으면 OP-TEE 설치 여부를 별도로 확인해야 합니다.
optee_os --version 2>/dev/null || strings /lib/optee_armtz/*.ta 2>/dev/null | grep -i optee | head -1