🇰🇷 한글 설명
Linux 커널 Bluetooth L2CAP 모듈의 l2cap_unregister_user() 함수에서 발생하는 use-after-free 취약점입니다. l2cap_register_user()와 l2cap_unregister_user()가 conn->lock을 사용하지 않아 l2cap_conn_del()과의 경쟁 조건이 발생하며, 이로 인해 메모리 참조 오류 및 list 손상이 초래될 수 있습니다.
💡 쉬운 설명
여러 프로세스가 동시에 같은 Bluetooth 연결 메모리에 접근할 때 보호 장치 없이 서로 간섭하면서 발생하는 문제입니다. 한 프로세스가 메모리를 삭제한 후 다른 프로세스가 이미 삭제된 메모리를 사용하려고 하면서 커널 충돌이나 권한 상승이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: L2CAP: Fix use-after-free in l2cap_unregister_user
After commit ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in
hci_chan_del"), l2cap_conn_del() uses conn->lock to protect access to
conn->users. However, l2cap_register_user() and l2cap_unregister_user()
don't use conn->lock, creating a race condition where these functions can
access conn->users and conn->hchan concurrently with l2cap_conn_del().
This can lead to use-after-free and list corruption bugs, as reported
by syzbot.
Fix this by changing l2cap_register_user() and l2cap_unregister_user()
to use conn->lock instead of hci_dev_lock(), ensuring consistent locking
for the l2cap_conn structure.
📍 영향받는 시스템
Linux kernel (commit ab4eedb790ca 이후의 모든 버전에서 Bluetooth L2CAP 사용)
⚔️ 공격 벡터
로컬 시스템에서 Bluetooth L2CAP 연결 중 동시에 사용자 등록/해제를 반복하여 race condition 유발
🛡️ 대응 방법
l2cap_register_user() 및 l2cap_unregister_user()에서 hci_dev_lock() 대신 conn->lock을 사용하도록 수정한 커널 패치 적용
🔧 검증 코드
커널 버전을 확인 후 L2CAP이 활성화되어 있다면 배포판의 보안 공지에서 해당 CVE 패치 적용 상태를 확인하세요.
uname -r && grep -i l2cap /boot/config-$(uname -r) 2>/dev/null