Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] advertising: Allow ServiceData with no data
@ 2026-11-24 13:31 Simon Mikuda
  2026-11-24 20:30 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-24 13:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

A ServiceData entry with an empty value is rejected and the whole
advertisement fails to register, as the byte type is checked on the
first element of the array, which an empty array does not have. A
Service Data AD with only the UUID is valid, and a Scan Delegator
advertises the BASS UUID like that.

Check the element type of the array instead.

Steps to reproduce:

  [bluetoothctl]> advertise.service 0x184f
  [bluetoothctl]> advertise on
  Failed to register advertisement: org.bluez.Error.Failed

Fixes: 758dae03725e ("core/advertising: Fix not parsing data properly")
Assisted-by: Claude:claude-opus-5-5
---
 src/advertising.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/advertising.c b/src/advertising.c
index d07068c6c..3a1d9a6b7 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -489,11 +489,11 @@ static bool parse_service_data(DBusMessageIter *iter, struct bt_ad *ad)
 		if (dbus_message_iter_get_arg_type(&value) != DBUS_TYPE_ARRAY)
 			goto fail;
 
-		dbus_message_iter_recurse(&value, &array);
-
-		if (dbus_message_iter_get_arg_type(&array) != DBUS_TYPE_BYTE)
+		if (dbus_message_iter_get_element_type(&value) !=
+							DBUS_TYPE_BYTE)
 			goto fail;
 
+		dbus_message_iter_recurse(&value, &array);
 		dbus_message_iter_get_fixed_array(&array, &service_data, &len);
 
 		DBG("Adding ServiceData for %s", uuid_str);

base-commit: 1608f836188610aabeff5a3164169ebe0360e443
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [BlueZ] advertising: Allow ServiceData with no data
  2026-11-24 13:31 [PATCH BlueZ] advertising: Allow ServiceData with no data Simon Mikuda
@ 2026-11-24 20:30 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-24 20:30 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1220884/

---Test result---

Test Summary:
CheckPatch                    PASS      0.28 seconds
GitLint                       PASS      0.20 seconds
BuildEll                      PASS      13.03 seconds
BluezMake                     PASS      170.12 seconds
CheckSmatch                   WARNING   175.06 seconds
bluezmakeextell               PASS      59.95 seconds
TestFunctional                PASS      883.50 seconds
IncrementalBuild              PASS      173.90 seconds
ScanBuild                     PASS      587.77 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capability


https://github.com/bluez/bluez/pull/2903

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-24 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:31 [PATCH BlueZ] advertising: Allow ServiceData with no data Simon Mikuda
2026-11-24 20:30 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox