🇰🇷 한글 설명
Linux 커널의 amdtee 드라이버에서 amdtee_close_session 함수 호출 시 레이스 컨디션으로 인한 Use-After-Free 취약점이 발견되었습니다. 세션 참조 횟수가 감소하여 세션이 파괴되는 과정 중에 다른 스레드가 해당 세션을 다시 열려고 시도할 경우, 이미 해제될 예정인 메모리에 접근하게 됩니다.
💡 쉬운 설명
컴퓨터가 사용 중인 데이터를 삭제하는 도중에 다른 프로그램이 그 데이터를 다시 사용하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 충돌하거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tee: amdtee: fix use-after-free vulnerability in amdtee_close_session
There is a potential race condition in amdtee_close_session that may
cause use-after-free in amdtee_open_session. For instance, if a session
has refcount == 1, and one thread tries to free this session via:
kref_put(&sess->refcount, destroy_session);
the reference count will get decremented, and the next step would be to
call destroy_session(). However, if in another thread,
amdtee_open_session() is called before destroy_session() has completed
execution, alloc_session() may return 'sess' that will be freed up
later in destroy_session() leading to use-after-free in
amdtee_open_session.
To fix this issue, treat decrement of sess->refcount and removal of
'sess' from session list in destroy_session() as a critical section, so
that it is executed atomically.
📍 영향받는 시스템
Linux Kernel (amdtee 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 타이밍에 세션을 열고 닫는 작업을 반복하여 메모리 오류를 유도함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 amdtee 세션 관리 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.