Patch "USB: serial: fix potential use-after-free after failed probe" has been added to the 3.10-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: fix potential use-after-free after failed probe

to the 3.10-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-fix-potential-use-after-free-after-failed-probe.patch
and it can be found in the queue-3.10 subdirectory.

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


>From 07fdfc5e9f1c966be8722e8fa927e5ea140df5ce Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@xxxxxxxxxx>
Date: Wed, 18 Feb 2015 10:34:50 +0700
Subject: USB: serial: fix potential use-after-free after failed probe

From: Johan Hovold <johan@xxxxxxxxxx>

commit 07fdfc5e9f1c966be8722e8fa927e5ea140df5ce upstream.

Fix return value in probe error path, which could end up returning
success (0) on errors. This could in turn lead to use-after-free or
double free (e.g. in port_remove) when the port device is removed.

Fixes: c706ebdfc895 ("USB: usb-serial: call port_probe and port_remove
at the right times")
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Acked-by: Greg Kroah-Hartman <greg@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/usb/serial/bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -76,7 +76,7 @@ static int usb_serial_device_probe(struc
 	retval = device_create_file(dev, &dev_attr_port_number);
 	if (retval) {
 		if (driver->port_remove)
-			retval = driver->port_remove(port);
+			driver->port_remove(port);
 		goto exit_with_autopm;
 	}
 


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

queue-3.10/usb-serial-fix-infinite-wait_until_sent-timeout.patch
queue-3.10/usb-serial-cp210x-adding-seletek-device-id-s.patch
queue-3.10/tty-fix-tty_wait_until_sent-on-64-bit-machines.patch
queue-3.10/usb-ftdi_sio-add-jtag-quirk-support-for-cyber-cortex-av-boards.patch
queue-3.10/usb-serial-fix-potential-use-after-free-after-failed-probe.patch
queue-3.10/net-irda-fix-wait_until_sent-poll-timeout.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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