patch "USB: serial: ir-usb: add missing endpoint sanity check" added to usb-testing
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: ir-usb: add missing endpoint sanity check
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon, after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 2988a8ae7476fe9535ab620320790d1714bdad1d Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 22 Jan 2020 11:15:26 +0100
Subject: USB: serial: ir-usb: add missing endpoint sanity check
Add missing endpoint sanity check to avoid dereferencing a NULL-pointer on open() in case a device lacks a bulk-out endpoint.
Note that prior to commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") the oops would instead happen on open() if the device lacked a bulk-in endpoint and on write() if it lacked a bulk-out endpoint.
--- drivers/usb/serial/ir-usb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/ir-usb.c +3 -0
@@ -195,6 +195,9 @@ static int ir_startup(struct usb_serial *serial)struct usb_irda_cs_descriptor *irda_desc;int rates; +if (serial->num_bulk_in <1 || serial->num_bulk_out <1 ) +return -ENODEV ; + irda_desc =irda_usb_find_class_desc (serial,0 );if (!irda_desc) { dev_err(&serial->dev->dev,
Signature · 1 line
2.25.0