🇰🇷 한글 설명
Linux 커널의 Bluetooth mgmt 계층에서 메시 전송 취소 시 발생하는 Use-After-Free 취약점입니다. 전송 취소 과정에서 이미 해제된 mesh_tx 객체의 포인터를 참조하여 시스템 불안정이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
블루투스 메시 전송을 취소할 때, 컴퓨터가 이미 삭제된 데이터를 다시 사용하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: mgmt: Dequeue pending mesh_send_sync entries on cancel
In send_cancel(), pending mesh_tx objects are removed from the
hdev->mesh_pending list and freed via mesh_send_complete(). However, if
a mesh transmission was already queued onto hdev->cmd_sync_work_list via
mesh_next(), the queued entry retains a raw pointer to mesh_tx.
When hci_cmd_sync_work later processes the entry, it attempts to execute
mesh_send_sync and its destroy callback mesh_send_start_complete using
the already freed mesh_tx pointer, leading to a use-after-free.
Fix this by invoking hci_cmd_sync_dequeue() for mesh_send_sync on the
target mesh_tx before completing it. If the entry is found and dequeued,
its destroy callback will complete and free the object; otherwise,
mesh_send_complete() is called directly.
Additionally, ensure the transmission queue advances after cancellation
or errors. In mesh_send_start_complete(), call mesh_next() on error
unless err is -ECANCELED, because hci_cmd_sync_dequeue() holds
hdev->cmd_sync_work_lock and calling mesh_next() synchronously would
deadlock. Instead, advance the queue in send_cancel() once the lock is
released and if no transmission is in progress.
📍 영향받는 시스템
Linux kernel (Bluetooth mesh 관련 모듈 사용 버전)
⚔️ 공격 벡터
특수하게 조작된 블루투스 메시 전송 요청 및 취소 시퀀스를 통한 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.