From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44050 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752379AbdEIJpO (ORCPT ); Tue, 9 May 2017 05:45:14 -0400 Subject: Patch "USB: serial: ftdi_sio: fix latency-timer error handling" has been added to the 4.4-stable tree To: johan@kernel.org, gregkh@linuxfoundation.org Cc: , From: Date: Tue, 09 May 2017 11:44:14 +0200 Message-ID: <1494323054111132@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled USB: serial: ftdi_sio: fix latency-timer error handling to the 4.4-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-ftdi_sio-fix-latency-timer-error-handling.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From e3e574ad85a208cb179f33720bb5f12b453de33c Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 12 Jan 2017 14:56:12 +0100 Subject: USB: serial: ftdi_sio: fix latency-timer error handling From: Johan Hovold commit e3e574ad85a208cb179f33720bb5f12b453de33c upstream. Make sure to detect short responses when reading the latency timer to avoid using stale buffer data. Note that no heap data would currently leak through sysfs as ASYNC_LOW_LATENCY is set by default. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1439,10 +1439,13 @@ static int read_latency_timer(struct usb FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE, 0, priv->interface, buf, 1, WDR_TIMEOUT); - if (rv < 0) + if (rv < 1) { dev_err(&port->dev, "Unable to read latency timer: %i\n", rv); - else + if (rv >= 0) + rv = -EIO; + } else { priv->latency = buf[0]; + } kfree(buf); Patches currently in stable-queue which might be from johan@kernel.org are queue-4.4/usb-serial-mct_u232-fix-modem-status-error-handling.patch queue-4.4/usb-serial-ark3116-fix-open-error-handling.patch queue-4.4/usb-serial-io_edgeport-fix-epic-descriptor-handling.patch queue-4.4/usb-serial-ti_usb_3410_5052-fix-control-message-error-handling.patch queue-4.4/usb-serial-keyspan_pda-fix-receive-sanity-checks.patch queue-4.4/usb-serial-sierra-fix-bogus-alternate-setting-assumption.patch queue-4.4/usb-serial-ssu100-fix-control-message-error-handling.patch queue-4.4/usb-serial-digi_acceleport-fix-incomplete-rx-sanity-check.patch queue-4.4/usb-serial-io_edgeport-fix-descriptor-error-handling.patch queue-4.4/usb-serial-quatech2-fix-control-message-error-handling.patch queue-4.4/usb-serial-ftdi_sio-fix-latency-timer-error-handling.patch