🇰🇷 한글 설명
Linux 커널의 Bluetooth QCA 드라이버에서 TLV 파서의 NVM 태그 길이 언더플로우 취약점이 발견되었습니다. 펌웨어에서 제공하는 길이가 특정 구조체 크기보다 작을 경우, 부호 없는 정수 변환 과정에서 매우 큰 값으로 변환되어 메모리 경계를 벗어난 읽기 및 쓰기가 발생할 수 있습니다.
💡 쉬운 설명
블루투스 장치에 전달되는 잘못된 데이터 때문에 컴퓨터의 메모리 영역을 허용되지 않은 범위까지 읽거나 쓸 수 있는 오류입니다. 이로 인해 시스템이 멈추거나 보안이 뚫릴 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: qca: fix NVM tag length underflow in TLV parser
In the TLV_TYPE_NVM branch of qca_tlv_check_data() the tag loop bound is
"while (idx < length - sizeof(struct tlv_type_nvm))". "length" is a signed
int from the firmware TLV header and sizeof(struct tlv_type_nvm) is a
size_t (12), so "length" is converted to size_t and any firmware-supplied
"length" < 12 makes the subtraction wrap to a huge value. The loop body
then reads a 12-byte struct tlv_type_nvm past the end of the short
vmalloc'd firmware buffer (and the EDL_TAG_ID_* handlers can write past it).
Rewrite the bound as "idx + sizeof(struct tlv_type_nvm) <= length"; both
operands are non-negative, so it no longer underflows and a "length" too
small for one record correctly skips the loop.
BUG: KASAN: vmalloc-out-of-bounds in qca_download_firmware.isra.0 (drivers/bluetooth/btqca.c:421)
Read of size 2 at addr ffffc900000e5004 by task kworker/u9:0/52
Workqueue: hci0 hci_power_on
Call Trace:
...
kasan_report (mm/kasan/report.c:595)
qca_download_firmware.isra.0 (drivers/bluetooth/btqca.c:421 drivers/bluetooth/btqca.c:617)
qca_uart_setup (drivers/bluetooth/btqca.c:948)
qca_setup (drivers/bluetooth/hci_qca.c:2029)
hci_uart_setup (drivers/bluetooth/hci_ldisc.c:438)
hci_dev_open_sync (net/bluetooth/hci_sync.c:5227)
hci_power_on (net/bluetooth/hci_core.c:920)
process_one_work (kernel/workqueue.c:3322)
worker_thread (kernel/workqueue.c:3486)
kthread (kernel/kthread.c:436)
ret_from_fork (arch/x86/kernel/process.c:158)
ret_from_fork_asm (arch/x86/entry/entry_64.S:245)
📍 영향받는 시스템
Linux kernel (Bluetooth QCA driver 포함 버전)
⚔️ 공격 벡터
조작된 펌웨어를 블루투스 컨트롤러에 전달하여 메모리 오버플로우 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.