Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-16 20:39:29 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-16 20:39:31 +0200
commit075ae89977e6607e954a35eb40e22e6768c737b8 (patch)
tree4ffe316e0cf57a5f801a94816709653901328e8b
parent8f0bf1ccaeb81b8c63fdfa551d7dd693cc56bc9e (diff)
ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit
(CVE-2019-15117,bsc#1145920). suse-commit: edfe3c90b22c1b1f09d77b27707e9c1b6b4dc523
-rw-r--r--sound/usb/mixer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 46966ce71430..930187127d3c 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1701,6 +1701,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
return -EINVAL;
}
+ if (desc->bLength < sizeof(*desc) + desc->bNrInPins)
+ return -EINVAL;
+
num_ins = 0;
ich = 0;
for (pin = 0; pin < input_pins; pin++) {