linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 219458] New: bluetooth connection fails after L2CAP: Fix uaf in l2cap_connect patch
Date: Sat, 02 Nov 2024 22:26:51 +0000	[thread overview]
Message-ID: <bug-219458-62941@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=219458

            Bug ID: 219458
           Summary: bluetooth connection fails after L2CAP: Fix uaf in
                    l2cap_connect patch
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Bluetooth
          Assignee: linux-bluetooth@vger.kernel.org
          Reporter: ghibo@mageia.org
        Regression: No

Hi guys.

After a recent kernel update I get problems in bluetooth connectivity. Mostly
some bluetooth audio devices (like speakers or headphones) are getting very
difficult to connect, even if already paired. And when the connection is
finally established they do not seem to do it in the correct way, to the extent
that the devices are not later correctly attached to pulseaudio or pipewire,
and not listed there. I thought the problem could be in bluez's bluetoothd, so
I tried several version of bluez, up to 5.78, including the current git
version, but mostly the behaviour hadn't changed.

I noticed this behaviour in 6.6.59 (including up to the current stable-queue
for 6.6.59 as of today, which will be merged into next 6.6.60). Ditto for
kernel series 6.11.x, in particular 6.11.5 and 6.11.6 show the same behaviour.

After a long series of attempts, I found the culprit can be traced back to
these single patch with subject "Bluetooth: L2CAP: Fix uaf in l2cap_connect":

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/releases/6.6.55/bluetooth-l2cap-fix-uaf-in-l2cap_connect.patch

and

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/releases/6.11.3/bluetooth-l2cap-fix-uaf-in-l2cap_connect.patch

which were included starting from kernels 6.6.55 and 6.11.3.

By reverting this patch, the connection with the device gets back working again
like a breeze, either at connecting and disconnecting several times in a row,
while before this reverting the connection was pretty clumsy.

Apparently this patch was for a security fix, but probably it's still
incomplete, as there is this side effect.

Difficult to track in logs, as logsa are pretty verbose anyway, as even in a
situation where a connection working there are a lot of warnings; mostly in a
broken connection with the patch included, logs are like:

bluetoothd[10741]: Failed to set mode: Failed (0x03)
bluetoothd[10741]: No matching connection for device
bluetoothd[10741]: No matching connection for device

while in a working connection, with the patch reverted, logs are like:

bluetoothd[10863]: Failed to set mode: Failed (0x03)
...
bluetoothd[10863]: No matching connection for device
...
bluetoothd[10863]: /org/bluez/hci0/dev_<mac_address>/sep2/fd2: fd(42) ready

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2024-11-02 22:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02 22:26 bugzilla-daemon [this message]
2024-11-05 14:59 ` [Bug 219458] bluetooth connection fails after L2CAP: Fix uaf in l2cap_connect patch bugzilla-daemon
2024-11-07 20:46 ` bugzilla-daemon
2024-11-07 20:47 ` bugzilla-daemon
2024-11-07 20:58 ` bugzilla-daemon
2024-11-08 16:31 ` bugzilla-daemon
2024-11-11 14:56 ` bugzilla-daemon
2024-11-12  0:53 ` bugzilla-daemon
2024-11-12  1:18 ` bugzilla-daemon
2024-11-12  2:10 ` bugzilla-daemon
2024-11-12 18:01 ` bugzilla-daemon
2024-11-18 15:53 ` bugzilla-daemon
2024-11-18 15:53 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-219458-62941@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).