🇰🇷 한글 설명
리눅스 커널의 블루투스 hci_core 모듈에서 패킷 수신 경로 중 hci_conn 객체를 조회하는 과정에서 잠금 메커니즘이 불완전하여 발생하는 취약점입니다. 이로 인해 다른 프로세스에서 연결 객체를 삭제할 경우 Use-After-Free(UAF)가 발생하여 시스템 충돌이나 보안 위협이 생길 수 있습니다.
💡 쉬운 설명
블루투스 데이터를 처리하는 과정에서 데이터가 삭제되는 시점과 사용하는 시점이 겹쳐 발생하는 오류입니다. 이 오류를 이용하면 컴퓨터 시스템이 갑자기 멈추거나 해킹에 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_core: lookup hci_conn on RX path on protocol side
The hdev lock/lookup/unlock/use pattern in the packet RX path doesn't
ensure hci_conn* is not concurrently modified/deleted. This locking
appears to be leftover from before conn_hash started using RCU
commit bf4c63252490b ("Bluetooth: convert conn hash to RCU")
and not clear if it had purpose since then.
Currently, there are code paths that delete hci_conn* from elsewhere
than the ordered hdev->workqueue where the RX work runs in. E.g.
commit 5af1f84ed13a ("Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync")
introduced some of these, and there probably were a few others before
it. It's better to do the locking so that even if these run
concurrently no UAF is possible.
Move the lookup of hci_conn and associated socket-specific conn to
protocol recv handlers, and do them within a single critical section
to cover hci_conn* usage and lookup.
syzkaller has reported a crash that appears to be this issue:
[Task hdev->workqueue] [Task 2]
hci_disconnect_all_sync
l2cap_recv_acldata(hcon)
hci_conn_get(hcon)
hci_abort_conn_sync(hcon)
hci_dev_lock
hci_dev_lock
hci_conn_del(hcon)
v-------------------------------- hci_dev_unlock
hci_conn_put(hcon)
conn = hcon->l2cap_data (UAF)
📍 영향받는 시스템
Linux Kernel (Bluetooth hci_core 관련 버전)
⚔️ 공격 벡터
특수하게 조작된 블루투스 패킷을 전송하여 커널 내의 Use-After-Free 상황을 유도
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인