🇰🇷 한글 설명
Linux 커널의 Bluetooth SCO 프로토콜 구현 중 sco_conn_ready 함수에서 소켓 참조 횟수(refcount)를 적절히 관리하지 않아 발생하는 취약점입니다. 이로 인해 소켓이 해제된 후에도 메모리에 접근을 시도하는 Use-After-Free(UAF) 오류가 발생할 수 있습니다.
💡 쉬운 설명
블루투스 연결 과정에서 컴퓨터가 이미 닫힌 연결 정보를 잘못 참조하여 시스템 오류를 일으키거나 보안 문제가 생길 수 있는 결함입니다. 메모리 관리 실수로 인해 발생하는 보안 취약점입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: SCO: hold sk properly in sco_conn_ready
sk deref in sco_conn_ready must be done either under conn->lock, or
holding a refcount, to avoid concurrent close. conn->sk and parent sk is
currently accessed without either, and without checking parent->sk_state:
[Task 1] [Task 2]
sco_sock_release
sco_conn_ready
sk = conn->sk
lock_sock(sk)
conn->sk = NULL
lock_sock(sk)
release_sock(sk)
sco_sock_kill(sk)
UAF on sk deref
and similarly for access to sco_get_sock_listen() return value.
Fix possible UAF by holding sk refcount in sco_conn_ready() and making
sco_get_sock_listen() increase refcount. Also recheck after lock_sock
that the socket is still valid. Adjust conn->sk locking so it's
protected also by lock_sock() of the associated socket if any.
📍 영향받는 시스템
Linux Kernel (Bluetooth SCO 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특수하게 조작된 블루투스 연결 요청을 통해 소켓 해제와 참조를 동시에 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 소켓 참조 횟수 관리 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인