linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fallout from commit 70fdb77 "audio/avrcp: Fix not always requesting capabilities"
@ 2016-03-31 17:00 Ivan Shapovalov
  2016-04-01  9:31 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Shapovalov @ 2016-03-31 17:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz

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

Hello,

The commit 70fdb7 "audio/avrcp: Fix not always requesting capabilities"
introduced a series of bugs where the code thinks that session-
>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

-- 
Ivan Shapovalov / intelfx /


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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Fallout from commit 70fdb77 "audio/avrcp: Fix not always requesting capabilities"
  2016-03-31 17:00 Fallout from commit 70fdb77 "audio/avrcp: Fix not always requesting capabilities" Ivan Shapovalov
@ 2016-04-01  9:31 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2016-04-01  9:31 UTC (permalink / raw)
  To: intelfx; +Cc: linux-bluetooth@vger.kernel.org, Luiz Augusto von Dentz

Hi Ivan,

On Thu, Mar 31, 2016 at 8:00 PM, Ivan Shapovalov <intelfx@intelfx.name> wrote:
> Hello,
>
> The commit 70fdb7 "audio/avrcp: Fix not always requesting capabilities"
> introduced a series of bugs where the code thinks that session-
>>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.

-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2016-04-01  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 17:00 Fallout from commit 70fdb77 "audio/avrcp: Fix not always requesting capabilities" Ivan Shapovalov
2016-04-01  9:31 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).