🇰🇷 한글 설명
리눅스 커널의 블루투스 MGMT 계층에서 HCI_CMD_SYNC 명령의 params_len 값이 8비트 필드 범위를 초과할 때 이를 적절히 차단하지 않는 취약점입니다. 이로 인해 헤더에 기록된 길이와 실제 데이터 길이가 일치하지 않는 불일치 문제가 발생하여 데이터 오염이나 다음 패킷의 해석 오류를 유발할 수 있습니다.
💡 쉬운 설명
블루투스 명령을 보낼 때 실제 데이터 양보다 헤더에 적힌 숫자를 작게 속여서 보낼 수 있는 문제입니다. 이로 인해 시스템이 데이터를 잘못 읽거나 다음 통신 데이터가 엉키는 혼란이 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: MGMT: reject HCI_CMD_SYNC params_len above 255
mgmt_hci_cmd_sync() checks that the message length agrees with params_len
but puts no upper bound on it. params_len is __le16 while the parameter
length in the HCI command header is a u8:
struct hci_command_hdr {
__le16 opcode;
__u8 plen;
} __packed;
hci_cmd_sync_alloc() assigns one to the other:
hdr->plen = plen;
if (plen)
skb_put_data(skb, param, plen);
so a params_len of 256 leaves plen at 0 while all 256 bytes are still
appended. The frame handed to the driver then declares no parameters and
carries 256 of them. On a length framed transport such as H:4 the
controller takes the trailing bytes as the start of the next packet.
The mgmt socket MTU is HCI_MAX_FRAME_SIZE, so params_len can reach about
1KB this way. Commit 03f1700b9b4d ("Bluetooth: MGMT: reject malformed
HCI_CMD_SYNC commands") only made params_len agree with the message
length, a value that fits the message but not the header field is still
accepted.
Reject params_len that does not fit the header field.
📍 영향받는 시스템
Linux Kernel (Bluetooth MGMT component)
⚔️ 공격 벡터
악의적인 HCI_CMD_SYNC 명령을 포함한 블루투스 MGMT 소켓 메시지 전송
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 params_len의 상한선을 제한해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.