🇰🇷 한글 설명
Linux 커널의 Bluetooth RFCOMM 모듈에서 보안 확인 처리 시 세션 목록을 탐색할 때 뮤텍스(rfcomm_mutex)를 보유하지 않아 발생하는 취약점입니다. 이로 인해 세션이 해제되는 동안 동시에 데이터 링크 채널(DLC)에 접근할 경우 Use-After-Free 오류가 발생할 수 있습니다.
💡 쉬운 설명
블루투스 연결을 관리하는 과정에서 데이터가 삭제되는 도중에 시스템이 해당 데이터를 읽으려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: RFCOMM: serialize security confirmation handling
rfcomm_security_cfm() looks up a session on session_list and then walks
its DLC list without holding rfcomm_mutex. Since RFCOMM session teardown
uses rfcomm_mutex, krfcommd can close and free the same session and DLCs
concurrently:
hci_rx_work krfcommd
----------- ---------
rfcomm_session_get()
rfcomm_lock()
rfcomm_session_close()
rfcomm_dlc_unlink()
rfcomm_session_del()
kfree(s)
rfcomm_unlock()
walk s->dlcs
The callback can then read a freed session list head and touch freed DLCs
while updating their flags or timers.
Serialize the session lookup and DLC traversal in rfcomm_security_cfm()
with rfcomm_mutex. This matches the existing RFCOMM session lifetime
rules and prevents concurrent rfcomm_session_del() / rfcomm_dlc_unlink()
from tearing the objects down while the callback is using them.
KASAN reported:
BUG: KASAN: slab-use-after-free in rfcomm_security_cfm+0x41c/0x440
Read of size 8 at addr ffff888111fb3960 by task kworker/u17:1/89
Workqueue: hci0 hci_rx_work
Call Trace:
rfcomm_security_cfm+0x41c/0x440
hci_encrypt_cfm+0x139/0x590
hci_encrypt_change_evt+0x37b/0xc40
hci_event_packet+0x71b/0xb20
hci_rx_work+0x293/0x730
Allocated by task 69:
rfcomm_session_add+0x9e/0x2f0
rfcomm_run+0x44b/0x41e0
Freed by task 69:
kfree+0x131/0x3c0
rfcomm_session_del+0x188/0x220
rfcomm_run+0x1985/0x41e0
📍 영향받는 시스템
Linux Kernel (Bluetooth RFCOMM 모듈 포함 버전)
⚔️ 공격 벡터
악의적인 블루투스 연결 요청 및 해제를 반복하여 커널의 Race Condition 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rfcomm_mutex 동기화 적용
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 배포판 보안 공지를 통해 확인