Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] mpris-proxy: Fix possible crash on OBEX transfer
@ 2026-11-06  8:05 Kai-Chuan Hsieh
  2026-11-06  8:05 ` [PATCH BlueZ 1/1] " Kai-Chuan Hsieh
  0 siblings, 1 reply; 3+ messages in thread
From: Kai-Chuan Hsieh @ 2026-11-06  8:05 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz, Bastien Nocera

This fixes a mpris-proxy crash (NULL dereference) that triggers on every
OBEX transfer, most visibly when a remote peer pushes a file to the host
over Bluetooth OBEX Object Push.

find_player_by_obex() is called from obex_property_changed() on every
Status change of any org.bluez.obex.Transfer1 object. Since the OBEX
g_dbus_client_new() client is rooted at "/", mpris-proxy proxies all of
obexd's objects, including the server-side transfer objects obexd
registers for an incoming push. Those never belong to a player, so the
list walk dereferences a NULL player->obex / session->obex and crashes.
A second, narrower crash exists in obex_get_image() when a failed
CreateSession leaves the inner proxy NULL and a Track change carries an
ImgHandle.

The affected code path (BIP cover art / find_player_by_obex) was
introduced between 5.77 and 5.80 and is still present in 5.88/master.

This change consolidates two earlier fixes that were proposed but never
merged, because the project moved off GitHub pull requests:

  - PR #2098 (Bastien Nocera, "mpris-proxy: Fix possible crash"),
    https://github.com/bluez/bluez/pull/2098 -- passed CI, auto-closed.
  - issue #2569 / PR #2631, the additional inner-proxy (session->obex)
    guard for the failed-CreateSession case,
    https://github.com/bluez/bluez/issues/2569
    https://github.com/bluez/bluez/pull/2631

Resending here on linux-bluetooth so it can land for the next release.
The change is confined to tools/mpris-proxy.c and only adds NULL / early-
return guards before existing dereferences, plus a g_clear_pointer()
when releasing session->obex; it adds no new dereferences.

Downstream bug report (reproducer and SRU analysis):
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/2172906


Kai-Chuan Hsieh (1):
  mpris-proxy: Fix possible crash on OBEX transfer

 tools/mpris-proxy.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-11-06 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06  8:05 [PATCH BlueZ 0/1] mpris-proxy: Fix possible crash on OBEX transfer Kai-Chuan Hsieh
2026-11-06  8:05 ` [PATCH BlueZ 1/1] " Kai-Chuan Hsieh
2026-11-06 10:47   ` 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