patch "USB: serial: mos7840: fix status-register error handling" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: mos7840: fix status-register error handling
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-linus 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 hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
794744abfffef8b1f3c0c8a4896177d6d13d653dMon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 4 Jul 2018 17:02:17 +0200
Subject: USB: serial: mos7840: fix status-register error handling
Add missing transfer-length sanity check to the status-register completion handler to avoid leaking bits of uninitialised slab data to user space.
--- drivers/usb/serial/mos7840.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/mos7840.c +3 -0
@@ -468,6 +468,9 @@ static void mos7840_control_callback(struct urb *urb) }dev_dbg (dev,"%s urb buffer size is %d\n" , __func__, urb->actual_length); +if (urb->actual_length <1 ) + goto out; +dev_dbg (dev,"%s mos7840_port->MsrLsr is %d port %d\n" , __func__, mos7840_port->MsrLsr, mos7840_port->port_num); data = urb->transfer_buffer;
Signature · 1 line
2.18.0