This is a note to let you know that I've just added the patch titled ALSA: control: Make sure that id->index does not overflow to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-control-make-sure-that-id-index-does-not-overflow.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 883a1d49f0d77d30012f114b2e19fc141beb3e8e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen <lars@xxxxxxxxxx> Date: Wed, 18 Jun 2014 13:32:35 +0200 Subject: ALSA: control: Make sure that id->index does not overflow From: Lars-Peter Clausen <lars@xxxxxxxxxx> commit 883a1d49f0d77d30012f114b2e19fc141beb3e8e upstream. The ALSA control code expects that the range of assigned indices to a control is continuous and does not overflow. Currently there are no checks to enforce this. If a control with a overflowing index range is created that control becomes effectively inaccessible and unremovable since snd_ctl_find_id() will not be able to find it. This patch adds a check that makes sure that controls with a overflowing index range can not be created. Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> Acked-by: Jaroslav Kysela <perex@xxxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/core/control.c | 3 +++ 1 file changed, 3 insertions(+) --- a/sound/core/control.c +++ b/sound/core/control.c @@ -343,6 +343,9 @@ int snd_ctl_add(struct snd_card *card, s if (snd_BUG_ON(!card || !kcontrol->info)) goto error; id = kcontrol->id; + if (id.index > UINT_MAX - kcontrol->count) + goto error; + down_write(&card->controls_rwsem); if (snd_ctl_find_id(card, &id)) { up_write(&card->controls_rwsem); Patches currently in stable-queue which might be from lars@xxxxxxxxxx are queue-3.10/alsa-control-protect-user-controls-against-concurrent-access.patch queue-3.10/alsa-control-don-t-access-controls-outside-of-protected-regions.patch queue-3.10/alsa-control-fix-replacing-user-controls.patch queue-3.10/alsa-control-make-sure-that-id-index-does-not-overflow.patch queue-3.10/alsa-control-handle-numid-overflow.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html