Ad

CVE-2026-77685

HIGH CVSS 3.1: 8,3 EPSS 0.35%
Обновлено 13 ноября 2026
Параметр Значение
CVSS 8,3 (HIGH)
Тип уязвимости CWE-191 (Целочисленное переполнение вниз), CWE-125 (Чтение за пределами буфера), CWE-787 (Запись за пределами буфера)
Публичный эксплойт Нет

Обработчик каналов управления мультиплексором RFCOMM в subsys/bluetooth/host/classic/rfcomm.c вычислил длину эха для команды BT_RFCOMM_TEST как buf->len - 1 и передал его rfcomm_send_test(), параметр длины которого является uint8_t. Уродливый, но FCS-валидный кадр UIH на DLCI 0 может оставить buf->len 0 после того, как rfcomm_handle_msg () вытаскивает двухбайтовый заголовок MCC, поэтому buf->len - 1 перетекает и сужается до 255. rfcomm_send_test () затем копирует 255 байт из буфера приема, который не содержит оставшихся действительных данных, и добавляет их к исходящему L2CAP PDU, выделенному только CONFIG_BT_L2CAP_TX_MTU (253 по умолчанию для CONFIG_BT_CLASSIC). Чтение исходного кода проходит через конец буфера приема ACL в соседние буферы того же пула net_buf, и целевая копия переполняет буфер передачи примерно на восемь байт; net_buf_add_mem() не выполняет проверку границ времени выполнения в обычных сборках, где компилируется базовый __ASSERT_NO_MSG().

The trigger is a single five-byte RFCOMM frame on the multiplexer control channel, which is processed as soon as the L2CAP channel for PSM 3 is established — before any DLC exists and independent of RFCOMM session state. bt_rfcomm_init() registers that L2CAP server with .sec_level = BT_SECURITY_L1, which l2cap_br_conn_security() accepts without any link key from a peer that does not claim host Secure Simple Pairing support, so an unpaired BR/EDR device in radio range of a connectable target with CONFIG_BT_RFCOMM enabled (SPP, HFP, HSP, GOEP and similar profiles all enable it) can reach the defect. Получившийся 255-байтный ответ TEST передается обратно злоумышленнику, раскрывая примерно 255 байтов соседней памяти стека / пула, включая содержимое соседних буферов приема, которые злоумышленник может заправить более ранними пакетами, и сопровождающая запись out-of-bounds повреждает память после буфера передачи, что может привести к сбою хоста Bluetooth. Запрос тривиально повторяется, поэтому как раскрытие, так и коррупция могут быть вызваны по желанию.

Требуется два исправления, и первое самостоятельно не закрывает запись out-of-bounds. Fix 1 (0040ef781e1d, 115768) снимает байт FCS в rfcomm_recv () и повторяет buf->len, отвергая что-либо над UINT8_MAX, что удаляет недостаточный поток и перечитываемое. Но rfcomm_make_uih_msg() по-прежнему распределяет ответ с bt_l2cap_create_pdu() и никогда не сравнивает запрашиваемую длину с хвостовой комнатой буфера, поэтому хорошо сформированная команда TEST, несущая шаблон около 248 байт или более, все еще строит ответ (3-байтный заголовок кадра, 2-байтный заголовок сообщения, шаблон, FCS) больше, чем 253 байт.

Шаблон, который долго может быть получен только тогда, когда RFCOMM L2CAP получает MTU (CONFIG_BT_RFCOMM_L2CAP_MTU, который по умолчанию CONFIG_BT_BUF_ACL_RX_SIZE) превышает CONFIG_BT_L2CAP_TX_MTU. Простой BR/EDR по умолчанию (200 против 253) не может достичь его, но от v4.3.0, позволяющего CONFIG_BT_GOEP, поднимает CONFIG_BT_BUF_ACL_RX_SIZE до 264 (265 от v4.4.0), поэтому GOEP строится только с исправлением 1, все еще превышающим буфер передачи до восьми байтов. Это включает в себя v4.3.2, последний выпуск v4.3, который несет исправление 1, но не получит исправление 2.

Fix 2 (214530895dd3, 118293) проверяет хвостовое отделение на каждом выделении RFCOMM PDU и закрывает эту остаточную запись.

Показать оригинальное описание (EN)

The RFCOMM multiplexer control-channel handler in subsys/bluetooth/host/classic/rfcomm.c computed the echo length for a BT_RFCOMM_TEST command as buf->len - 1 and passed it to rfcomm_send_test(), whose length parameter is a uint8_t. A malformed but FCS-valid UIH frame on DLCI 0 can leave buf->len == 0 after rfcomm_handle_msg() pulls the two-byte MCC header, so buf->len - 1 underflows and narrows to 255. rfcomm_send_test() then copies 255 bytes out of a receive buffer that holds no remaining valid data, and appends them to an outgoing L2CAP PDU allocated with only CONFIG_BT_L2CAP_TX_MTU (253 by default for CONFIG_BT_CLASSIC) bytes of tailroom. The source read runs past the end of the ACL receive buffer into adjacent buffers of the same net_buf pool, and the destination copy overruns the transmit buffer by about eight bytes; net_buf_add_mem() performs no runtime bounds check in ordinary builds, where the underlying __ASSERT_NO_MSG() is compiled out. The trigger is a single five-byte RFCOMM frame on the multiplexer control channel, which is processed as soon as the L2CAP channel for PSM 3 is established — before any DLC exists and independent of RFCOMM session state. bt_rfcomm_init() registers that L2CAP server with .sec_level = BT_SECURITY_L1, which l2cap_br_conn_security() accepts without any link key from a peer that does not claim host Secure Simple Pairing support, so an unpaired BR/EDR device in radio range of a connectable target with CONFIG_BT_RFCOMM enabled (SPP, HFP, HSP, GOEP and similar profiles all enable it) can reach the defect. The resulting 255-byte TEST response is transmitted back to the attacker, disclosing roughly 255 bytes of adjacent stack/pool memory — including the contents of neighbouring receive buffers, which an attacker can prime with earlier packets — and the accompanying out-of-bounds write corrupts memory following the transmit buffer, which can crash the Bluetooth host. The request is trivially repeatable, so both the disclosure and the corruption can be driven at will. Two fixes are needed, and the first on its own does not close the out-of-bounds write. Fix 1 (0040ef781e1d, #115768) strips the FCS byte in rfcomm_recv() and echoes buf->len, rejecting anything over UINT8_MAX, which removes the underflow and the over-read. But rfcomm_make_uih_msg() still allocates the response with bt_l2cap_create_pdu() and never compares the requested length with the buffer's tailroom, so a well-formed TEST command carrying a pattern of about 248 bytes or more still builds a response (3-byte frame header, 2-byte message header, pattern, FCS) larger than the 253 bytes available. A pattern that long can only be received when the RFCOMM L2CAP receive MTU (CONFIG_BT_RFCOMM_L2CAP_MTU, which defaults to CONFIG_BT_BUF_ACL_RX_SIZE) exceeds CONFIG_BT_L2CAP_TX_MTU. The plain BR/EDR defaults (200 against 253) cannot reach it, but from v4.3.0 enabling CONFIG_BT_GOEP raises CONFIG_BT_BUF_ACL_RX_SIZE to 264 (265 from v4.4.0), so GOEP builds with only fix 1 applied still overrun the transmit buffer by up to eight bytes. This includes v4.3.2, the last v4.3 release, which carries fix 1 but will not receive fix 2. Fix 2 (214530895dd3, #118293) checks the tailroom on every RFCOMM PDU allocation and closes this residual write.

Характеристики атаки

Способ атаки
Смежная сеть
Нужен доступ к локальной сети
Сложность
Низкая
Легко эксплуатировать
Нужны права
Не требуются
Права не нужны
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Высокое
Полная утечка данных
Целостность
Низкое
Частичная модификация данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1