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-09-29 17:44:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bluez (Old)
 and      /work/SRC/openSUSE:Factory/.bluez.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bluez"

Tue Sep 29 17:44:40 2026 rev:215 rq:1380780 version:5.87

Changes:
--------
--- /work/SRC/openSUSE:Factory/bluez/bluez.changes      2026-09-17 
15:16:01.321415045 +0200
+++ /work/SRC/openSUSE:Factory/.bluez.new.383539/bluez.changes  2026-09-29 
17:44:41.271439699 +0200
@@ -1,0 +2,5 @@
+Fri Sep 25 19:01:04 UTC 2026 - NbergTP <[email protected]>
+
+- Add fix-crash-on-UUID-discovery.patch
+
+-------------------------------------------------------------------

New:
----
  fix-crash-on-UUID-discovery.patch

----------(New B)----------
  New:
- Add fix-crash-on-UUID-discovery.patch
----------(New E)----------

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

Other differences:
------------------
++++++ bluez.spec ++++++
--- /var/tmp/diff_new_pack.L1WgJx/_old  2026-09-29 17:44:43.353526849 +0200
+++ /var/tmp/diff_new_pack.L1WgJx/_new  2026-09-29 17:44:43.355526932 +0200
@@ -56,6 +56,7 @@
 Patch3:         bluez-no-cups-devel-buildreq.patch
 # workaround for broken tests (reported upstream but not yet fixed)
 Patch4:         bluez-disable-broken-tests.diff
+Patch5:         fix-crash-on-UUID-discovery.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

++++++ fix-crash-on-UUID-discovery.patch ++++++
>From 82af2beafc39510e2c4a439bf44faea711d6503f Mon Sep 17 00:00:00 2001
From: Tom Catshoek <[email protected]>
Date: Thu, 9 Jul 2026 14:27:04 +0200
Subject: [PATCH] adapter: Fix crash on UUID discovery filter match

is_filter_match() looks up each discovery-filter UUID in the queue of
services parsed from a device advertisement. When that services list was
migrated from a GSList to a struct queue, the queue_find() call kept
GLib's g_slist_find_custom() argument order, passing the UUID string
where queue_find() expects a match function and the comparison function
where it expects the match data.

As a result queue_find() calls the UUID string as if it were a function,
jumping into non-executable heap and crashing bluetoothd with SIGSEGV as
soon as an advertisement matches a UUID filter configured via
SetDiscoveryFilter.

Add a queue_match_func_t helper and pass the arguments in the correct
order.

Fixes: https://github.com/bluez/bluez/issues/2282
---
 src/adapter.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 210225243f..4ffa32a52c 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7184,6 +7184,14 @@ static void adapter_msd_notify(struct btd_adapter 
*adapter,
        }
 }
 
+static bool match_uuid(const void *data, const void *match_data)
+{
+       const char *uuid = data;
+       const char *match = match_data;
+
+       return strcmp(uuid, match) == 0;
+}
+
 static bool is_filter_match(GSList *discovery_filter, struct eir_data 
*eir_data,
                                                                int8_t rssi)
 {
@@ -7216,8 +7224,7 @@ static bool is_filter_match(GSList *discovery_filter, 
struct eir_data *eir_data,
                                 * uuid.
                                 */
                                if (queue_find(eir_data->services,
-                                                       m->data,
-                                                       g_strcmp) != NULL)
+                                                       match_uuid, m->data))
                                        got_match = true;
                        }
                }

Reply via email to