Skip to content

[PW_SID:1089698] [BlueZ,1/2] mpris-proxy: Fix possible crash#2097

Closed
BluezTestBot wants to merge 2 commits into
masterfrom
1089698
Closed

[PW_SID:1089698] [BlueZ,1/2] mpris-proxy: Fix possible crash#2097
BluezTestBot wants to merge 2 commits into
masterfrom
1089698

Conversation

@BluezTestBot
Copy link
Copy Markdown

find_player_by_obex() doesn't check whether session->obex is a valid
pointer before dereferecing it, but all code paths that assign it use
create_obex_session() to assign it, a function that can fail.

Check whether session->obex is null before dereferencing it.

#0 find_player_by_obex at tools/mpris-proxy.c:2819
#1 obex_property_changed at tools/mpris-proxy.c:2929
#2 add_property at gdbus/client.c:373
#3 update_properties at gdbus/client.c:399
#5 properties_changed at gdbus/client.c:537
#6 signal_filter at gdbus/watch.c:416
#7 message_filter at gdbus/watch.c:566
#10 message_dispatch at gdbus/mainloop.c:59
#13 g_main_context_dispatch_unlocked at ../glib/gmain.c:4451
#14 g_main_context_iterate_unlocked at ../glib/gmain.c:4516

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2466640

tools/mpris-proxy.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

hadess added 2 commits May 5, 2026 08:33
find_player_by_obex() doesn't check whether session->obex is a valid
pointer before dereferecing it, but all code paths that assign it use
create_obex_session() to assign it, a function that can fail.

Check whether session->obex is null before dereferencing it.

 #0 find_player_by_obex at tools/mpris-proxy.c:2819
 #1 obex_property_changed at tools/mpris-proxy.c:2929
 #2 add_property at gdbus/client.c:373
 #3 update_properties at gdbus/client.c:399
 #5 properties_changed at gdbus/client.c:537
 #6 signal_filter at gdbus/watch.c:416
 #7 message_filter at gdbus/watch.c:566
 #10 message_dispatch at gdbus/mainloop.c:59
 #13 g_main_context_dispatch_unlocked at ../glib/gmain.c:4451
 #14 g_main_context_iterate_unlocked at ../glib/gmain.c:4516

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2466640
Protect against trying to access session->obex variable that might be
null after failure to create the session object.
@BluezTestBot
Copy link
Copy Markdown
Author

CheckPatch
Desc: Run checkpatch.pl script
Duration: 0.91 seconds
Result: FAIL
Output:

[BlueZ,1/2] mpris-proxy: Fix possible crash
ERROR:SPACING: spaces required around that '=' (ctx:VxW)
#89: FILE: tools/mpris-proxy.c:2824:
+		obex_path= g_dbus_proxy_get_path(session->obex);
 		         ^

/github/workspace/src/patch/14554528.patch total: 1 errors, 0 warnings, 13 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14554528.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 5, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@BluezTestBot
Copy link
Copy Markdown
Author

GitLint
Desc: Run gitlint
Duration: 0.68 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

BuildEll
Desc: Build and Install ELL
Duration: 20.33 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

BluezMake
Desc: Build BlueZ
Duration: 619.55 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

CheckSmatch
Desc: Run smatch tool with source
Duration: 324.51 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

bluezmakeextell
Desc: Build Bluez with External ELL
Duration: 163.73 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 622.47 seconds
Result: PASS

@BluezTestBot
Copy link
Copy Markdown
Author

ScanBuild
Desc: Run Scan Build
Duration: 924.11 seconds
Result: PASS

@BluezTestBot BluezTestBot deleted the 1089698 branch May 5, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants