Bluetooth: RFCOMM: validate skb length in MCC handlers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 08b9c1fbe78f4ad3f6250c6541cfaabdbeb81997| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: RFCOMM: validate skb length in MCC handlers
The RFCOMM MCC handlers cast skb->data to protocol-specific structs without validating skb->len first. A malicious remote device can send truncated MCC frames and trigger out-of-bounds reads in these handlers.
Fix this by using skb_pull_data() to validate and access the required data before dereferencing it.
rfcomm_recv_rpn() requires special handling since ETSI TS 07.10 allows 1-byte RPN requests. Handle this by validating only the DLCI byte first, and validating the full struct only when len > 1.
From the CVE record · Linux
Linux kernel Bluetooth RFCOMM MCC handlers do not validate frame length before reading protocol data. A malicious remote device can send truncated MCC frames to trigger out-of-bounds reads.
Engineers running Linux kernels with Bluetooth RFCOMM support should check whether their kernel is affected; affected versions were not provided.