🇰🇷 한글 설명
리눅스 커널의 Thunderbolt 드라이버에서 XDomain 작업이 연결 해제 시 적절히 취소되지 않아 발생하는 Use-After-Free 취약점입니다. 특정 요청 핸들러와 장치 제거 경로가 직렬화되지 않아, 장치가 해제된 후 지연된 작업이 실행될 수 있습니다.
💡 쉬운 설명
썬더볼트 장치를 연결 해제할 때, 컴퓨터가 이미 삭제한 데이터를 다시 사용하려고 시도하면서 시스템 오류가 발생할 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: Prevent XDomain delayed work use-after-free on disconnect
tb_xdp_handle_request() runs on system_wq and queues
xd->state_work via queue_delayed_work() in three request handlers:
PROPERTIES_CHANGED_REQUEST, UUID_REQUEST (via start_handshake),
and LINK_STATE_CHANGE_REQUEST. Similarly, update_xdomain() queues
xd->properties_changed_work when local properties change.
Concurrently, tb_xdomain_remove() calls stop_handshake() which does
cancel_delayed_work_sync() on both delayed works. Later,
tb_xdomain_unregister() calls device_unregister() which eventually
frees the xdomain. Since commit 559c1e1e0134 ("thunderbolt: Run
tb_xdp_handle_request() in system workqueue") moved the request
handler off tb->wq, the handler and the remove path are no longer
serialized. If queue_delayed_work() executes after
cancel_delayed_work_sync() but before the xdomain is freed, the
delayed work fires on a freed object.
Add xd->removing that tb_xdomain_remove() sets under xd->lock
before calling stop_handshake(). Each external queue site holds
the same lock and checks removing before calling
queue_delayed_work(). This provides the mutual exclusion needed:
either the queue site acquires the lock first and queues work that
the subsequent cancel will see, or the remove path acquires the
lock first and the queue site observes removing == true and skips
the queue.
📍 영향받는 시스템
Thunderbolt 드라이버를 사용하는 리눅스 커널 버전 (특정 커밋 559c1e1e0134 이후 영향 가능)
⚔️ 공격 벡터
물리적인 Thunderbolt 장치의 연결 및 해제를 반복하여 레이스 컨디션(Race Condition) 유도
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.