🇰🇷 한글 설명
Zephyr 블루투스 스택의 sdp.c 파일 내 bt_sdp_parse_attribute() 함수에서 경계 검사 미흡으로 인해 1바이트 오버리드 취약점이 발생합니다. 공격자가 조작된 SDP 레코드를 전송할 경우, 메모리 경계 끝에서 1바이트를 초과하여 읽게 되어 시스템 중단(DoS)을 유발할 수 있습니다.
💡 쉬운 설명
블루투스 연결 과정에서 데이터를 읽을 때, 데이터의 실제 길이보다 1바이트를 더 읽으려고 시도하는 오류가 있습니다. 이로 인해 시스템이 예기치 않게 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
bt_sdp_parse_attribute() in subsys/bluetooth/host/classic/sdp.c validated only that the SDP record buffer held the type-marker byte plus the 2-byte attribute ID (a check of buf->len < 3) but then read a fourth byte, the data-element descriptor (type), via net_buf_simple_pull_u8(). Because net_buf_simple_pull_u8() dereferences buf->data[0] before its only bounds guard (an __ASSERT_NO_MSG that compiles out when CONFIG_ASSERT is disabled, the production default), a record of exactly three bytes (0x09 followed by a 2-byte attribute ID) causes a one-byte read past the end of the logical buffer. The parser is reachable from inbound, remote-controlled data: a Bluetooth BR/EDR peer acting as an SDP server returns discovery-response records that are stored verbatim in the client receive buffer and parsed via the public bt_sdp_get_attr()/bt_sdp_has_attr()/bt_sdp_record_parse() helpers. The over-read is bounded to a single byte that is used only as an internal length selector and is never leaked to the attacker; subsequent length checks then reject the malformed record. Realistic impact is therefore limited to an edge-case denial of service (a fault only if the record ends exactly at a mapped-memory boundary, or a deterministic assert panic when CONFIG_ASSERT=y). Affects Zephyr v4.3.0 and v4.4.0; fixed by adding sizeof(type) to the length check.
📍 영향받는 시스템
Zephyr v4.3.0 및 v4.4.0
⚔️ 공격 벡터
원격의 블루투스 BR/EDR 피어가 조작된 SDP 응답 레코드를 전송하여 공격
🛡️ 대응 방법
길이 검사 로직에 데이터 타입 크기(sizeof(type))를 포함하도록 수정된 최신 버전으로 업데이트
🔧 검증 코드
명령어 결과로 v4.3.0 또는 v4.4.0이 출력되면 해당 취약점에 노출된 버전입니다.
git describe --tags 2>/dev/null | grep -E 'v4\.(3|4)\.0'