Zephyrの Bluetooth Classic で遠隔から情報漏えいとメモリ破壊のおそれがある脆弱性
Summary
Zephyrの Bluetooth Classic の RFCOMM 処理に脆弱性があり、近くにいる未ペアリングの機器から細工したフレームを送られると、メモリの範囲外の読み取りと書き込みが起きるおそれがあります。影響は1.7.0以降4.5.0より前のZephyrで、修正版の4.5.0への更新が必要です。CONFIG_BT_RFCOMM が有効な機器では、早めの更新を検討してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Zephyrの Bluetooth Classic の RFCOMM 処理に脆弱性があり、近くにいる未ペアリングの機器から細工したフレームを送られると、メモリの範囲外の読み取りと書き込みが起きるおそれがあります。影響は1.7.0以降4.5.0より前のZephyrで、修正版の4.5.0への更新が必要です。CONFIG_BT_RFCOMM が有効な機器では、早めの更新を検討してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| zephyrprojectzephyr |
≥ 1.7.0, < 4.5.0→ 4.5.0 |
4.5.0 |
Original description The description as published by the source.
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,…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com