]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
cx231xx-audio: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:53:58 +0000 (09:53 -0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 20 Jun 2017 10:18:23 +0000 (12:18 +0200)
commit1cf0baf0bbbde8715359405a11b0e79d5a1fe644
tree6a35325b7db08df274d84d78b334a9551ab5ba61
parent6286e73a532d7968239e95c708d34b879cd34dc1
cx231xx-audio: fix NULL-deref at probe

BugLink: http://bugs.launchpad.net/bugs/1694621
commit 65f921647f4c89a2068478c89691f39b309b58f7 upstream.

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer or accessing memory beyond the endpoint array should a
malicious device lack the expected endpoints.

Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver")
Cc: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/media/usb/cx231xx/cx231xx-audio.c