stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH 4.4 23/35] USB: serial: safe_serial: fix information leak in completion handler
Date: Thu, 16 Mar 2017 23:29:42 +0900	[thread overview]
Message-ID: <20170316142908.256103666@linuxfoundation.org> (raw)
In-Reply-To: <20170316142906.685052998@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit 8c76d7cd520ebffc1ea9ea0850d87a224a50c7f2 upstream.

Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that could be triggered by a malicious device.

This avoids leaking up to 56 bytes from after the URB transfer buffer to
user space.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -205,6 +205,11 @@ static void safe_process_read_urb(struct
 	if (!safe)
 		goto out;
 
+	if (length < 2) {
+		dev_err(&port->dev, "malformed packet\n");
+		return;
+	}
+
 	fcs = fcs_compute10(data, length, CRC10_INITFCS);
 	if (fcs) {
 		dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs);

  parent reply	other threads:[~2017-03-16 14:32 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 14:29 [PATCH 4.4 00/35] 4.4.55-stable review Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 01/35] USB: serial: digi_acceleport: fix OOB data sanity check Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 02/35] USB: serial: digi_acceleport: fix OOB-event processing Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 03/35] crypto: improve gcc optimization flags for serpent and wp512 Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 04/35] MIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change Greg Kroah-Hartman
2017-03-19 16:05   ` Ben Hutchings
2017-03-20 10:03     ` Ralf Baechle
2017-03-20 10:30     ` Greg Kroah-Hartman
2017-03-20 10:42       ` Arnd Bergmann
2017-03-20 16:29         ` Greg Kroah-Hartman
2017-03-20 16:43           ` Ralf Baechle
2017-03-16 14:29 ` [PATCH 4.4 05/35] MIPS: ip27: Disable qlge driver in defconfig Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 06/35] MIPS: Update ip27_defconfig for SCSI_DH change Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 07/35] MIPS: ip22: Fix ip28 build for modern gcc Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 08/35] MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change Greg Kroah-Hartman
2017-03-19 16:06   ` Ben Hutchings
2017-03-20 10:15     ` Ralf Baechle
2017-03-20 16:29       ` Greg Kroah-Hartman
2017-03-20 16:50         ` Ralf Baechle
2017-03-20 17:34           ` Greg Kroah-Hartman
2017-03-20 10:31     ` Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 09/35] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 10/35] MIPS: ralink: Cosmetic change to prom_init() Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 11/35] MIPS: ralink: Remove unused rt*_wdt_reset functions Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 12/35] cpmac: remove hopeless #warning Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 13/35] mm: memcontrol: avoid unused function warning Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 14/35] MIPS: DEC: Avoid la pseudo-instruction in delay slots Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 15/35] MIPS: Netlogic: Fix CP0_EBASE redefinition warnings Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 16/35] tracing: Add #undef to fix compile error Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 17/35] powerpc: Emulation support for load/store instructions on LE Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 18/35] usb: gadget: dummy_hcd: clear usb_gadget region before registration Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 19/35] usb: dwc3: gadget: make Set Endpoint Configuration macros safe Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 20/35] usb: gadget: function: f_fs: pass companion descriptor along Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 21/35] usb: host: xhci-dbg: HCIVERSION should be a binary number Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 22/35] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers Greg Kroah-Hartman
2017-03-16 14:29 ` Greg Kroah-Hartman [this message]
2017-03-16 14:29 ` [PATCH 4.4 24/35] USB: serial: omninet: fix reference leaks at open Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 25/35] USB: iowarrior: fix NULL-deref at probe Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 26/35] USB: iowarrior: fix NULL-deref in write Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 27/35] USB: serial: io_ti: fix NULL-deref in interrupt callback Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 28/35] USB: serial: io_ti: fix information leak in completion handler Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 30/35] mvsas: fix misleading indentation Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 31/35] KVM: s390: Fix guest migration for huge guests resulting in panic Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 32/35] s390/kdump: Use "LINUX" ELF note name instead of "CORE" Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 33/35] nfit, libnvdimm: fix interleave set cookie calculation Greg Kroah-Hartman
2017-03-19 16:38   ` Ben Hutchings
2017-03-20 17:55     ` Dan Williams
2017-03-16 14:29 ` [PATCH 4.4 34/35] dm: flush queued bios when process blocks to avoid deadlock Greg Kroah-Hartman
2017-03-16 14:29 ` [PATCH 4.4 35/35] ext4: dont BUG when truncating encrypted inodes on the orphan list Greg Kroah-Hartman
2017-03-16 19:20 ` [PATCH 4.4 00/35] 4.4.55-stable review Shuah Khan
2017-03-16 22:36 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170316142908.256103666@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).