summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHui Peng <benquike@163.com>2018-12-25 18:11:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-13 10:07:12 +0100
commit0ba61349a8b37aa7cc4651cfee044247f7ab0281 (patch)
tree2136c11ccbbf5865b76a543273659932bfc992ed /sound
parent172236e69b714879fe534b1fa2e8ffed2c221ebc (diff)
downloadlinux-stable-0ba61349a8b37aa7cc4651cfee044247f7ab0281.tar.gz
linux-stable-0ba61349a8b37aa7cc4651cfee044247f7ab0281.tar.bz2
linux-stable-0ba61349a8b37aa7cc4651cfee044247f7ab0281.zip
ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks
commit cbb2ebf70daf7f7d97d3811a2ff8e39655b8c184 upstream. In `create_composite_quirk`, the terminating condition of for loops is `quirk->ifnum < 0`. So any composite quirks should end with `struct snd_usb_audio_quirk` object with ifnum < 0. for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { ..... } the data field of Bower's & Wilkins PX headphones usb device device quirks do not end with {.ifnum = -1}, wihch may result in out-of-bound read. This Patch fix the bug by adding an ending quirk object. Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Hui Peng <benquike@163.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/quirks-table.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index e86fecaa26ec..12d0efd61b8a 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3356,6 +3356,9 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
}
}
},
+ {
+ .ifnum = -1
+ },
}
}
},