# CVE-2026-77685 - Bluetooth Classic RFCOMM: integer underflow in the MCC TEST command handler leads to out-of-bounds read disclosed to the peer and out-of-bounds write

DevFeed: [CVE-2026-77685 - Bluetooth Classic RFCOMM: integer underflow in the MCC TEST command handler leads to out-of-bounds read disclosed to the peer and out-of-bounds write](<https://devfeed.tech/articles/cve-2026-77685-bluetooth-classic-rfcomm-integer-underflow-in-the-mcc-test-command-handler-leads-to-out-of-bounds-read-disclosed-to-the-peer-and-out-of-bounds-write-127475.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-77685>)

Author: cvefeed.io

Published: 2026-11-10T22:20:53Z

Content type: article

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Bluetooth](<https://devfeed.tech/topics/bluetooth.md>), [cve remediation](<https://devfeed.tech/topics/cve-remediation.md>), [memory pool](<https://devfeed.tech/topics/memory-pool.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [3](<https://devfeed.tech/tags/3.md>), [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [bt](<https://devfeed.tech/tags/bt.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [channel](<https://devfeed.tech/tags/channel.md>), [command](<https://devfeed.tech/tags/command.md>), [config](<https://devfeed.tech/tags/config.md>), [contents](<https://devfeed.tech/tags/contents.md>), [control](<https://devfeed.tech/tags/control.md>), [copy](<https://devfeed.tech/tags/copy.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-77685](<https://devfeed.tech/tags/cve-2026-77685.md>), [data](<https://devfeed.tech/tags/data.md>), [handler](<https://devfeed.tech/tags/handler.md>), [out-of-bounds-write](<https://devfeed.tech/tags/out-of-bounds-write.md>), [peer](<https://devfeed.tech/tags/peer.md>), [published](<https://devfeed.tech/tags/published.md>), [test](<https://devfeed.tech/tags/test.md>), [write](<https://devfeed.tech/tags/write.md>), [zephyr](<https://devfeed.tech/tags/zephyr.md>), [zephyrproject](<https://devfeed.tech/tags/zephyrproject.md>)

## AI overview

A malformed five-byte RFCOMM TEST frame can underflow the echo length to 255, causing an out-of-bounds read that discloses adjacent pool memory and an out-of-bounds write that can corrupt memory and crash the Bluetooth host. The defect is reachable before any DLC or RFCOMM session is established: an unpaired BR/EDR peer in radio range can trigger it on a connectable device with RFCOMM enabled. Fix 1 strips the FCS and prevents the underflow and over-read, but does not bound response data by transmit-buffer tailroom. A sufficiently large valid TEST pattern can still overflow the transmit buffer when the receive MTU exceeds the transmit MTU; the excerpt identifies GOEP builds as an affected case. Fix 2 adds tailroom checks to RFCOMM PDU allocations and closes that remaining write.

## Source excerpt

CVE ID :CVE-2026-77685 Published : Nov. 10, 2026, 10:20 p.m. | 11 minutes ago Description :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 cr