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 l2cap segmentation error in concurrent subscription #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Jul 1, 2021

  1. Adapt go.mod to fork

    Jon-Bright committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    8e0131e View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2021

  1. Implement processing of L2CAP Connection Parameter Update Requests.

    This checks that the request is valid, replies to the other side in any event (with an accept/reject) and, if accepted, also updates the connection parameters to HCI.
    Jon-Bright committed Jul 2, 2021
    Configuration menu
    Copy the full SHA
    cf1e810 View commit details
    Browse the repository at this point in the history
  2. More fork changes

    Jon-Bright committed Jul 2, 2021
    Configuration menu
    Copy the full SHA
    34cfe1a View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2021

  1. Fix concurrency bug: when unmarshalling an aclData package, we need t…

    …o copy the data buffer.
    
    The bug that otherwise happens is:
    1. HCI.mainLoop gets a byte buffer, reads into it, calls handlePacket
    2. handlePacket calls handleL2CAP, which unmarshals into an aclData. This aclData references the original b slice
    3. handleL2CAP adds the aclData to a channel
    4. handlePacket returns the buffer to the pool
    5. Repeat from 1, getting the same buffer _while the aclData referencing it is still in the channel_
    Triggering this needs a relatively high data rate, but was possible repeatedly for me with a Polar H10.
    Jon-Bright committed Jul 4, 2021
    Configuration menu
    Copy the full SHA
    c8f9e41 View commit details
    Browse the repository at this point in the history
  2. Complete forking: import Jon-Bright/gatt everywhere rather than bette…

    …rcap/gatt.
    
    NB: I still intend to drop this fork once I've got everything that I want working and any resulting pull requests to bettercap are merged.
    Jon-Bright committed Jul 4, 2021
    Configuration menu
    Copy the full SHA
    b3e8270 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2021

  1. Add missing bounds check. The caller is checking for four bytes, the …

    …callee is checking for six bytes, but nobody was checking for 5 bytes :)
    Jon-Bright committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    2b00d6e View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

  1. Replace log by logrus.

    Your Name committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    a7a36b9 View commit details
    Browse the repository at this point in the history
  2. Fix go.mod to match repo.

    Your Name committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    eac68dd View commit details
    Browse the repository at this point in the history
  3. Replace references.

    Your Name committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    74a3e17 View commit details
    Browse the repository at this point in the history
  4. Fix mods.

    Your Name committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    4684463 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2022

  1. Fix l2cap segmentation error in concurrent subscription: Protect segm…

    …ent sending in l2cap.conn.write to avoid sending unordered segments for the same l2cap channel
    david-alonso-orca committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    edd7ec2 View commit details
    Browse the repository at this point in the history