]> git.ipfire.org Git - people/ms/linux.git/commit
ALSA: control: Protect user controls against concurrent access
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 18 Jun 2014 11:32:31 +0000 (13:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Nov 2014 09:55:36 +0000 (10:55 +0100)
commit883f30e7d98d97d704df38cd2972a33be852f23a
tree308e857429c3c3cd1674977a6e5b4f9a656b2e14
parentcd684d88d3f89954322b3d15fc26b2055d542784
ALSA: control: Protect user controls against concurrent access

[ Upstream commit 07f4d9d74a04aa7c72c5dae0ef97565f28f17b92 ]

The user-control put and get handlers as well as the tlv do not protect against
concurrent access from multiple threads. Since the state of the control is not
updated atomically it is possible that either two write operations or a write
and a read operation race against each other. Both can lead to arbitrary memory
disclosure. This patch introduces a new lock that protects user-controls from
concurrent access. Since applications typically access controls sequentially
than in parallel a single lock per card should be fine.

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-4652]
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/sound/core.h
sound/core/control.c
sound/core/init.c