Skip to contentSkip to conversation

Fallout from commit 70fdb77 "audio/avrcp: Fix not always requesting capabilities"

DISCUSSION Ivan Shapovalov 2 participants 2 messages Mar 31, 2016 – Apr 1, 2016 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

The commit 70fdb7 "audio/avrcp: Fix not always requesting capabilities" introduced a series of bugs where the code thinks that session-

Quoted 1 line

controller->player cannot be NULL, but in fact it can be so. The first

one was fixed in 177d27 "audio/avrcp: Fix crash when connecting to controllers", but there remain multiple code pathes via avrcp_register_notification() -> callback -> avrcp_handle_event() -> avrcp_{status,track,playback_pos,settings,uids}_changed() where session->controller->player may be dereferenced.

I'm unsure how to fix that properly (either not register notifications, or ignore specific callbacks if s->c->player is NULL), so I'm just reporting this.

Ref.: https://bugs.archlinux.org/task/48644

Signature · 4 lines
Ivan Shapovalov / intelfx /


Please Cc: me on replies as I'm not subscribed to the list.
#1 lore raw

Hi Ivan,

Quoted 4 lines · Ivan Shapovalov

Hello,

The commit 70fdb7 "audio/avrcp: Fix not always requesting capabilities" introduced a series of bugs where the code thinks that session-

Quoted 8 lines
Quoted 1 line

controller->player cannot be NULL, but in fact it can be so. The first

one was fixed in 177d27 "audio/avrcp: Fix crash when connecting to controllers", but there remain multiple code pathes via avrcp_register_notification() -> callback -> avrcp_handle_event() -> avrcp_{status,track,playback_pos,settings,uids}_changed() where session->controller->player may be dereferenced.

I'm unsure how to fix that properly (either not register notifications, or ignore specific callbacks if s->c->player is NULL), so I'm just reporting this.

Ref.: https://bugs.archlinux.org/task/48644

Ive just sent a patch to prevent the above to happen, it is very uncommon that those event would be supported for a controller that does not have player capabilities but indeed it could cause crashes.

Signature · 1 line
Luiz Augusto von Dentz