🇰🇷 한글 설명
Linux 커널의 Bluetooth L2CAP 계층에서 cleanup_listen() 함수 호출 시 잠금 순서 불일치로 인한 데드락 위험이 발견되었습니다. 이를 해결하기 위해 채널을 직접 닫는 대신 타이머를 사용하여 비동기적으로 채널을 닫도록 수정되었습니다.
💡 쉬운 설명
블루투스 연결을 정리하는 과정에서 시스템의 자원 잠금 순서가 꼬여 컴퓨터가 멈출 수 있는 문제가 있었습니다. 이제는 안전한 순서로 연결을 정리하도록 방식이 개선되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: L2CAP: use chan timer to close channels in cleanup_listen()
l2cap_chan_close() removes the channel from conn->chan_l, which
must be done under conn->lock. cleanup_listen() runs under the
parent sk_lock, so acquiring conn->lock would invert the
established conn->lock -> chan->lock -> sk_lock order.
Instead of calling l2cap_chan_close() directly, schedule
l2cap_chan_timeout with delay 0 to close the channel
asynchronously. The timeout handler already acquires conn->lock
and chan->lock in the correct order.
The timer is only armed when chan->conn is still set: if it is
already NULL, l2cap_conn_del() has already processed this channel
(l2cap_chan_del + l2cap_sock_teardown_cb + l2cap_sock_close_cb),
so there is nothing left to do. If l2cap_conn_del() races in
after the timer is armed, __clear_chan_timer() inside
l2cap_chan_del() cancels it; if the timer has already fired, the
handler returns harmlessly because chan->conn was cleared.
📍 영향받는 시스템
Linux Kernel (Bluetooth L2CAP 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특수하게 조작된 블루투스 패킷을 통해 연결 정리 과정에서 잠금 충돌을 유도하여 시스템 데드락 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인