]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
[media] cx231xx-cards: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:53:56 +0000 (09:53 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 10:31:45 +0000 (07:31 -0300)
commit0cd273bb5e4d1828efaaa8dfd11b7928131ed149
tree4b4ab3e86013d5fe0f1af5f255ed1e3292f3ff7e
parenteacb975b48272f54532b62f515a3cf7eefa35123
[media] cx231xx-cards: fix NULL-deref at probe

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: stable <stable@vger.kernel.org> # 2.6.30
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>
drivers/media/usb/cx231xx/cx231xx-cards.c