ALSA: control: Don't access controls outside of protected regions
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 18 Jun 2014 11:32:33 +0000 (13:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Dec 2014 14:16:13 +0000 (15:16 +0100)
commitc99bd4fceec6135a31f95de4716a42e2064909bf
tree34f4b6f8c247710f4d8481b107a62ba034eba45e
parenteb406993c7b80c68b053c5d3d6431f4b8d0560eb
ALSA: control: Don't access controls outside of protected regions

(commit fd9f26e4eca5d08a27d12c0933fceef76ed9663d upstream)

A control that is visible on the card->controls list can be freed at any time.
This means we must not access any of its memory while not holding the
controls_rw_lock. Otherwise we risk a use after free access.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[wt: fixes CVE-2014-4653]
Signed-off-by: Willy Tarreau <w@1wt.eu>
sound/core/control.c