🇰🇷 한글 설명
Linux 커널의 Bluetooth hci_sync 구성 요소에서 장치 등록 해제 시 명령 백로그를 적절히 처리하지 못하는 취약점이 발견되었습니다. 사용자가 응답하지 않는 컨트롤러에 지속적으로 명령을 보내 백로그를 쌓으면, 장치 해제 과정에서 시스템이 매우 긴 시간 동안 멈추는 현상이 발생할 수 있습니다.
💡 쉬운 설명
블루투스 장치를 끌 때 처리되지 못한 명령들이 너무 많이 쌓여 있으면 컴퓨터가 응답하지 않고 멈춰버릴 수 있는 문제입니다. 공격자가 일부러 명령을 계속 보내서 시스템을 먹통으로 만들 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_sync: don't drain cmd_sync backlog on unregister
hci_unregister_dev() disables cmd_work and cmd_timer, then calls
hci_cmd_sync_clear(), whose cancel_work_sync() waits for
hci_cmd_sync_work() to return. That worker dequeues and runs every
entry on cmd_sync_work_list. With cmd_work disabled nothing reaches
the controller, so each queued HCI command waits the full
HCI_CMD_TIMEOUT (2s).
The backlog has no bound. Userspace can keep queuing MGMT commands
such as MGMT_OP_GET_CLOCK_INFO against a controller that doesn't
answer. Closing /dev/vhci then blocks in vhci_release() for
backlog * 2s:
INFO: task syz-executor:5749 blocked for more than 143 seconds.
cancel_work_sync
hci_cmd_sync_clear
hci_unregister_dev
vhci_release
In a local reproduction the backlog held more than 5000 entries,
which comes to hours of hang.
Stop the worker from taking new entries once HCI_UNREGISTER is set,
and wake any request still waiting with -ENODEV before cancelling
the work. The entries left over are destroyed with -ECANCELED by the
existing sweep in hci_cmd_sync_clear(). They stay on the list until
the work has stopped, so hci_cmd_sync_dequeue() and friends still see
them. A callback already running may still issue another command,
which delays unregister by at most one timeout per remaining command,
not by the whole backlog.
📍 영향받는 시스템
Linux Kernel (Bluetooth hci_sync 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 사용자가 응답하지 않는 블루투스 컨트롤러에 지속적으로 MGMT 명령을 보내 백로그를 생성하여 시스템을 중단시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 hci_unregister_dev()의 동작 방식을 수정해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인