🇰🇷 한글 설명
Linux 커널의 Bluetooth L2CAP 프로토콜에서 응답이 없는 명령어를 보낼 때 식별자(ident)가 해제되지 않는 메모리 누수 취약점이 발견되었습니다. 이로 인해 식별자 범위가 고갈되면 잘못된 식별자(0)가 사용되어 블루투스 연결이 영구적으로 중단될 수 있습니다.
💡 쉬운 설명
블루투스 통신 중에 사용되는 번호표가 다 써버려도 반납되지 않아 발생하는 문제입니다. 번호표가 바닥나면 블루투스 연결이 끊기고 다시 작동하지 않게 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: L2CAP: fix tx ident leak for commands without a response
Commit 6c3ea155e5ee ("Bluetooth: L2CAP: Fix not tracking outstanding
TX ident") changed ident allocation to use an IDA, releasing idents in
l2cap_put_ident() when the matching response command is received.
But identifiers allocated for commands that have no response defined
are never released. In particular L2CAP_LE_CREDITS is sent repeatedly for
the lifetime of an LE CoC channel, so a peer streaming data to the
host exhausts the 1-255 ident range after 254 credit packets. From
then on l2cap_get_ident() fails:
kernel: Bluetooth: Unable to allocate ident: -28
and every subsequent L2CAP_LE_CREDITS packet is sent with ident 0,
which is invalid (Core Spec, Vol 3, Part A, Section 4: "Signaling
identifier 0x00 is an invalid identifier and shall never be used in
any command"). Remote stacks that validate the ident drop these
commands, never receive new credits, and the channel stalls
permanently. With default socket buffers this happens after roughly 0.5 MB
of received data (the exact amount depends on the socket receive buffer):
< ACL Data TX: Handle 2048 flags 0x00 dlen 12
LE L2CAP: LE Flow Control Credit (0x16) ident 0 len 4
Source CID: 64
Credits: 1
Release the ident immediately after sending L2CAP_LE_CREDITS since no
response will ever release it. Use a local variable instead of
chan->ident so that an ident that an EXT_FLOWCTL channel may be waiting on
(e.g. a pending reconfigure) is not overwritten by a credit packet.
Also add the missing L2CAP_LE_CONN_RSP case to l2cap_put_ident() so
idents allocated for outgoing L2CAP_LE_CONN_REQ commands are released
when the response arrives.
📍 영향받는 시스템
Linux Kernel (L2CAP Bluetooth 스택 사용 버전)
⚔️ 공격 벡터
원격의 블루투스 장치가 지속적으로 L2CAP_LE_CREDITS 패킷을 전송하여 식별자 자원을 고갈시킴 (DoS)
🛡️ 대응 방법
커널 패치(Commit 6c3ea155e5ee)를 적용하여 식별자 할당 및 해제 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 배포판 보안 공지를 통해 확인하십시오.