Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BLE ACL fragmented packet reassembly #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omicronns
Copy link

I believe there was a bug in BLE packet reassembly. Current code assumed L2CAP_Hdr will be after HCI_ACL_Hdr in incoming packet fragments, but this is not true. In the next fragments there can be any data which only sometimes will be interpreted by scapy as L2CAP. According to Wireshark's dissector actual fragment data starts after HCI_ACL_Hdr which I extracted using HCI_ACL_Hdr:][1:].

Also both reassembly if statements can be pulled into the conditional immediately after them.

@vdechef
Copy link

vdechef commented Jun 16, 2023

I just stumbled on the same problem, and got to the same conclusion. Then I found your PR. Thanks for this.
This should be integrated in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants