Patch "USB: serial: mct_u232: fix modem-status error handling" has been added to the 3.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    USB: serial: mct_u232: fix modem-status error handling

to the 3.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-serial-mct_u232-fix-modem-status-error-handling.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 36356a669eddb32917fc4b5c2b9b8bf80ede69de Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@xxxxxxxxxx>
Date: Thu, 12 Jan 2017 14:56:16 +0100
Subject: USB: serial: mct_u232: fix modem-status error handling

From: Johan Hovold <johan@xxxxxxxxxx>

commit 36356a669eddb32917fc4b5c2b9b8bf80ede69de upstream.

Make sure to detect short control-message transfers so that errors are
logged when reading the modem status at open.

Note that while this also avoids initialising the modem status using
uninitialised heap data, these bits could not leak to user space as they
are currently not used.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/usb/serial/mct_u232.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -322,8 +322,12 @@ static int mct_u232_get_modem_stat(struc
 			MCT_U232_GET_REQUEST_TYPE,
 			0, 0, buf, MCT_U232_GET_MODEM_STAT_SIZE,
 			WDR_TIMEOUT);
-	if (rc < 0) {
+	if (rc < MCT_U232_GET_MODEM_STAT_SIZE) {
 		dev_err(&port->dev, "Get MODEM STATus failed (error = %d)\n", rc);
+
+		if (rc >= 0)
+			rc = -EIO;
+
 		*msr = 0;
 	} else {
 		*msr = buf[0];


Patches currently in stable-queue which might be from johan@xxxxxxxxxx are

queue-3.18/usb-serial-mct_u232-fix-modem-status-error-handling.patch
queue-3.18/usb-serial-ark3116-fix-open-error-handling.patch
queue-3.18/usb-serial-io_edgeport-fix-epic-descriptor-handling.patch
queue-3.18/usb-serial-ti_usb_3410_5052-fix-control-message-error-handling.patch
queue-3.18/usb-serial-keyspan_pda-fix-receive-sanity-checks.patch
queue-3.18/usb-serial-sierra-fix-bogus-alternate-setting-assumption.patch
queue-3.18/usb-serial-ssu100-fix-control-message-error-handling.patch
queue-3.18/usb-serial-digi_acceleport-fix-incomplete-rx-sanity-check.patch
queue-3.18/usb-serial-io_edgeport-fix-descriptor-error-handling.patch
queue-3.18/usb-serial-quatech2-fix-control-message-error-handling.patch
queue-3.18/usb-serial-ftdi_sio-fix-latency-timer-error-handling.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]