🇰🇷 한글 설명
Hearing Access Service(HAS)의 GATT 서버가 서비스 등록 전에도 보안 연결 콜백을 실행하여 발생하는 취약점입니다. 서비스가 등록되기 전 기존에 페어링된 기기가 재연결될 경우, NULL 포인터 참조로 인해 시스템이 충돌하거나 중단될 수 있습니다.
💡 쉬운 설명
블루투스 보청기 관련 기능이 완전히 준비되기 전에 이전에 연결했던 기기가 접속을 시도하면 시스템이 오류를 일으켜 꺼질 수 있습니다. 이는 공격자가 기기를 계속 재부팅시켜 서비스 이용을 방해하는 용도로 사용될 수 있습니다.
🇺🇸 원문 (English)
The Hearing Access Service (HAS) GATT server in subsys/bluetooth/audio/has.c installs a connection-callback set unconditionally via BT_CONN_CB_DEFINE, so security_changed() runs for every connection that establishes security even before the application has called bt_has_register(). The service attribute pointers hearing_aid_features_attr, preset_control_point_attr, and active_preset_index_attr remain NULL until bt_has_register() resolves them and sets has.registered.
With CONFIG_BT_SETTINGS, settings_set_cb() restores each bonded client's persisted context at boot and unconditionally sets context->flags to BONDED_CLIENT_INIT_FLAGS (non-zero). When a previously bonded peer reconnects and re-establishes security during the startup window before bt_has_register() has been called, security_changed() sees the non-zero flags and schedules notify_work_handler, which calls bt_gatt_is_subscribed() with a still-NULL attribute pointer. That triggers an assertion (__ASSERT(attr, ...) in bt_gatt_is_subscribed()), or a NULL dereference of attr->uuid when assertions are compiled out.
The result is a remotely triggerable (Bluetooth, adjacent) crash of the HAS peripheral. Exploitation requires the peer to have previously bonded with the device and to reconnect within the boot-time race window before the application registers the service; a peer that reconnects persistently can prolong the outage. Impact is denial of service only, with no memory corruption or information disclosure.
The fix adds an early if (!has.registered) { return; } guard in security_changed(), so no notification work is scheduled until the GATT service is registered and its attribute pointers are valid.
📍 영향받는 시스템
Bluetooth stack with CONFIG_BT_SETTINGS and HAS enabled
⚔️ 공격 벡터
이전에 페어링된 블루투스 기기가 장치 부팅 직후 서비스 등록 전 재연결을 시도하여 DoS 유발
🛡️ 대응 방법
security_changed() 함수 내에 has.registered 상태를 확인하는 가드 조건(if (!has.registered) return;)을 추가하여 패치
🔧 검증 코드
명령어 결과에서 security_changed 함수 내에 if (!has.registered) 구문이 포함되어 있는지 확인하여 패치 여부를 판단합니다.
grep -r "has.registered" subsys/bluetooth/audio/has.c
📊 CVSS Vector String
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server