Bug 218880 - HCI_EVT Packet 'Flush Occurred' Misalignment
Summary: HCI_EVT Packet 'Flush Occurred' Misalignment
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-24 08:43 UTC by Yuxuan Hu
Modified: 2024-05-24 08:48 UTC (History)
6 users (show)

See Also:
Kernel Version: 6.7.9
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel Log including HCI packets (4.39 KB, text/plain)
2024-05-24 08:48 UTC, Yuxuan Hu
Details
TShark pcap file (1.72 KB, application/vnd.tcpdump.pcap)
2024-05-24 08:48 UTC, Yuxuan Hu
Details

Description Yuxuan Hu 2024-05-24 08:43:44 UTC
Hi All,

Our fuzzing tool found a possible bug when testing Bluetooth RFCOMM connection:

(1) A 'Flush Occurred' HCI_EVT packet with incorrect 'parameter_total_length' field and parameters was maliciously sent to the host (hexadecimal content: '11 3D C4 02 62 D1').

(2) Because 'hci_ev_table'(/net/bluetooth/hci_event.c: 7514) does not include 'Flush Occurred' event, the function hci_event_func(/net/bluetooth/hci_event.c: 7644) doesn't check the 'parameter_total_length' field of this packet.

(3) When the controller transmits additional HCI packets to the host, these packets are concatenated to the previously mentioned Flush Occurred packet. This results in the packets being disregarded by the host.

Attachment 1 [details] is Kernel Log, which includes the printed HCI packet interactions between the host and controller. All HCI packets following the line mentioned below are ignored by the host:

'''
[ 1555.520646] <- [EVT] 11 3D C4 02 62 D1
'''

Attachment 2 [details] contains packet captures from tshark.

It remains unclear whether this behavior constitutes a bug or a feature. We apologize if this inquiry causes any offense.
Thank you very much for taking the time to read.

Best Regard,
Yuxuan Hu.
Comment 1 Yuxuan Hu 2024-05-24 08:48:04 UTC
Created attachment 306328 [details]
Kernel Log including HCI packets
Comment 2 Yuxuan Hu 2024-05-24 08:48:31 UTC
Created attachment 306329 [details]
TShark pcap file

Note You need to log in before you can comment on or make changes to this bug.