[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110812210555.525113147@clark.kroah.org>
Date: Fri, 12 Aug 2011 14:04:24 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Nicolai Krakowiak <nicolai.krakowiak@...il.com>,
Daniel Mack <zonque@...il.com>,
Clemens Ladisch <clemens@...isch.de>,
Takashi Iwai <tiwai@...e.de>
Subject: [39/90] ALSA: snd-usb: avoid dividing by zero on invalid input
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nicolai Krakowiak <nicolai.krakowiak@...il.com>
commit 60c961a9e1ed879a4d151df6076bf1203f595f73 upstream.
Signed-off-by: Nicolai Krakowiak <nicolai.krakowiak@...il.com>
Acked-by: Daniel Mack <zonque@...il.com>
Acked-by: Clemens Ladisch <clemens@...isch.de>
Signed-off-by: Takashi Iwai <tiwai@...e.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
sound/usb/mixer.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1191,6 +1191,11 @@ static int parse_audio_feature_unit(stru
if (state->mixer->protocol == UAC_VERSION_1) {
csize = hdr->bControlSize;
+ if (!csize) {
+ snd_printdd(KERN_ERR "usbaudio: unit %u: "
+ "invalid bControlSize == 0\n", unitid);
+ return -EINVAL;
+ }
channels = (hdr->bLength - 7) / csize - 1;
bmaControls = hdr->bmaControls;
} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists