🇰🇷 한글 설명
Linux 커널의 tee: optee 드라이버에서 클라이언트가 서플리컨트(supplicant)보다 먼저 종료될 경우 발생하는 Use-After-Free 취약점입니다. 클라이언트 종료 시 요청이 메모리에서 해제되지만, 서플리컨트가 해당 요청 ID를 참조하려고 시도하면서 해제된 메모리에 접근하여 시스템 불안정이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
프로그램이 작업을 마치기도 전에 메모리에서 데이터가 먼저 삭제되어, 나중에 그 데이터를 다시 쓰려고 할 때 오류가 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tee: optee: prevent use-after-free when the client exits before the supplicant
Commit 70b0d6b0a199 ("tee: optee: Fix supplicant wait loop") made the
client wait as killable so it can be interrupted during shutdown or
after a supplicant crash. This changes the original lifetime expectations:
the client task can now terminate while the supplicant is still processing
its request.
If the client exits first it removes the request from its queue and
kfree()s it, while the request ID remains in supp->idr. A subsequent
lookup on the supplicant path then dereferences freed memory, leading to
a use-after-free.
Serialise access to the request with supp->mutex:
* Hold supp->mutex in optee_supp_recv() and optee_supp_send() while
looking up and touching the request.
* Let optee_supp_thrd_req() notice that the client has terminated and
signal optee_supp_send() accordingly.
With these changes the request cannot be freed while the supplicant still
has a reference, eliminating the race.
📍 영향받는 시스템
Linux Kernel (tee: optee 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
클라이언트 프로세스를 의도적으로 조기 종료시켜 서플리컨트와의 레이스 컨디션을 유도하는 방식
🛡️ 대응 방법
커널 패치(Commit 70b0d6b0a199 적용 버전)를 통해 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인