Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] mceusb: fix NULL-deref at probe

Make sure to check for the required out endpoint to avoid dereferencing
a NULL-pointer in mce_request_packet should a malicious device lack such
an endpoint. Note that this path is hit during probe.

Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver")

Cc: stable <stable@vger.kernel.org> # 2.6.36
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Johan Hovold and committed by
Mauro Carvalho Chehab
03eb2a55 74c839b2

+2 -2
+2 -2
drivers/media/rc/mceusb.c
··· 1288 1288 } 1289 1289 } 1290 1290 } 1291 - if (ep_in == NULL) { 1292 - dev_dbg(&intf->dev, "inbound and/or endpoint not found"); 1291 + if (!ep_in || !ep_out) { 1292 + dev_dbg(&intf->dev, "required endpoints not found\n"); 1293 1293 return -ENODEV; 1294 1294 } 1295 1295