Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bluez for openSUSE:Factory checked 
in at 2026-10-06 19:13:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bluez (Old)
 and      /work/SRC/openSUSE:Factory/.bluez.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bluez"

Tue Oct  6 19:13:31 2026 rev:216 rq:1382408 version:5.87

Changes:
--------
--- /work/SRC/openSUSE:Factory/bluez/bluez.changes      2026-09-29 
17:44:41.271439699 +0200
+++ /work/SRC/openSUSE:Factory/.bluez.new.3698736/bluez.changes 2026-10-06 
19:13:36.237419505 +0200
@@ -1,0 +2,9 @@
+Sun Oct  4 14:51:01 UTC 2026 - Michal Smucr <[email protected]>
+
+- Add a2dp-fix-loading-of-remote-SEP-from-cache.patch
+  Without this, Pipewire forces AVDTP Discover on every reconnect,
+  causing codec negotiation failures on some LE Audio headsets.
+  * Upstream issue: https://github.com/bluez/bluez/issues/2321
+  * Upstream commit: 
https://github.com/bluez/bluez/commit/b7d71e5067856b0daf2f1f73b3fc95483236610e
+
+-------------------------------------------------------------------

New:
----
  a2dp-fix-loading-of-remote-SEP-from-cache.patch

----------(New B)----------
  New:
- Add a2dp-fix-loading-of-remote-SEP-from-cache.patch
  Without this, Pipewire forces AVDTP Discover on every reconnect,
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bluez.spec ++++++
--- /var/tmp/diff_new_pack.H3fE2D/_old  2026-10-06 19:13:37.191459643 +0200
+++ /var/tmp/diff_new_pack.H3fE2D/_new  2026-10-06 19:13:37.192459685 +0200
@@ -57,6 +57,7 @@
 # workaround for broken tests (reported upstream but not yet fixed)
 Patch4:         bluez-disable-broken-tests.diff
 Patch5:         fix-crash-on-UUID-discovery.patch
+Patch6:         a2dp-fix-loading-of-remote-SEP-from-cache.patch
 # disable tests for bypass boo#1078285
 Patch12:        disable_some_obex_tests.patch
 # Upstream suggests to use btmon instead of hcidump and does not want those 
patches

++++++ a2dp-fix-loading-of-remote-SEP-from-cache.patch ++++++
>From b7d71e5067856b0daf2f1f73b3fc95483236610e Mon Sep 17 00:00:00 2001
From: Mikhail Gavrilov <[email protected]>
Date: Fri, 10 Jul 2026 12:28:17 +0500
Subject: [PATCH] a2dp: Fix loading of remote SEP from cache

Commit 912f5efb0dd9 ("a2dp: Fix handling of codec capability storage")
added an 'i >= 2' condition to the loop that parses the stored codec
capabilities. Since i starts at 0 the loop body never runs, i stays 0,
and the subsequent 'if (i != size)' check discards every endpoint found
in the cache:

  load_remote_sep() Unable to load LastUsed: rseid 6 not found

With no remote SEP loaded, avdtp_discover() can no longer take the
cached path and issues AVDTP Discover/Get All Capabilities on every
reconnect, and a2dp_setup_remote_path() returns NULL so the transport
ends up at /org/bluez/hciX/dev_YY/fd0 instead of .../sepN/fd0.

The condition was presumably meant to bound the writes into data[128],
which the original commit did not actually fix: caps is read with
'%512s' so size / 2 can be up to 256. Validate size up front instead.

Fixes: https://github.com/bluez/bluez/issues/2285
---
 profiles/audio/a2dp.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index c8adc31225..a4ba1dacf9 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -2398,7 +2398,16 @@ static void load_remote_sep(struct a2dp_channel *chan, 
GKeyFile *key_file,
                        delay_reporting = false;
                }
 
-               for (i = 0, size = strlen(caps); i < size && i >= 2; i += 2) {
+               size = strlen(caps);
+
+               g_free(value);
+
+               if (size % 2 || size / 2 > (int) sizeof(data)) {
+                       warn("Unable to load Endpoint: seid %u", rseid);
+                       continue;
+               }
+
+               for (i = 0; i < size; i += 2) {
                        uint8_t *tmp = data + i / 2;
 
                        if (sscanf(caps + i, "%02hhx", tmp) != 1) {
@@ -2407,8 +2416,6 @@ static void load_remote_sep(struct a2dp_channel *chan, 
GKeyFile *key_file,
                        }
                }
 
-               g_free(value);
-
                if (i != size)
                        continue;
 

Reply via email to