# 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

- **Severity:** HIGH 8.3
- **CVSS:** 8.3 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 21, 2026-11-28)
- **CWE:** CWE-125, CWE-191, CWE-787
- **Published:** 2026-11-10T22:07:41.411Z
- **Modified:** 2026-11-13T14:18:00.243Z

## Who should check

- Anyone running zephyrproject zephyr \>= 1.7.0, \< 4.5.0

## 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 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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 1.7.0, \< 4.5.0 (cvelist)

## Technologies

Zephyr RTOS

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-77685. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-77685.md
Affected: zephyrproject zephyr >= 1.7.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-77685 being exploited?

There is no confirmed exploitation: CVE-2026-77685 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-77685?

High: CVSS 8.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-77685?

zephyrproject zephyr \>= 1.7.0, \< 4.5.0.

### Is there a fix for CVE-2026-77685?

Yes. Fixed in zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-77685?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-mhhp-8w67-cggv>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/0040ef781e1d705066045850782cd8efa5beaa02>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/214530895dd327ef34468fb25e132df6976e927c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-77685>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-77685> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-77685>
