Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1377335
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.2.y-ckt 21/70] USB: mct_u232: add sanity checking in probe |
| Date | 2016-04-12 23:40 +0200 |
| Message-ID | <rnect-5Ws-67@gated-at.bofh.it> (permalink) |
| References | <rndzH-5be-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.2.8-ckt8 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Oliver Neukum <oneukum@suse.com>
commit 4e9a0b05257f29cf4b75f3209243ed71614d062e upstream.
An attack using the lack of sanity checking in probe is known. This
patch checks for the existence of a second port.
CVE-2016-3136
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
[johan: add error message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/usb/serial/mct_u232.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index fd707d6..89726f7 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -376,14 +376,21 @@ static void mct_u232_msr_to_state(struct usb_serial_port *port,
static int mct_u232_port_probe(struct usb_serial_port *port)
{
+ struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
+ /* check first to simplify error handling */
+ if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
+ dev_err(&port->dev, "expected endpoint missing\n");
+ return -ENODEV;
+ }
+
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
/* Use second interrupt-in endpoint for reading. */
- priv->read_urb = port->serial->port[1]->interrupt_in_urb;
+ priv->read_urb = serial->port[1]->interrupt_in_urb;
priv->read_urb->context = port;
spin_lock_init(&priv->lock);
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[4.2.y-ckt stable] Linux 4.2.8-ckt8 stable review Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 69/70] mwifiex: fix corner case association failure Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 35/70] ext4: ignore quota mount options if the quota feature is enabled Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 64/70] lib/ucs2_string: Correct ucs2 -> utf8 conversion Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 63/70] efi: Add pstore variables to the deletion whitelist Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 65/70] ipr: Fix out-of-bounds null overwrite Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 22/70] USB: cypress_m8: add endpoint sanity check Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 62/70] efi: Make efivarfs entries immutable by default Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 61/70] efi: Make our variable validation list include the guid Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 09/70] hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 70/70] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:00 +0200 [PATCH 4.2.y-ckt 42/70] USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 49/70] parisc: Fix kernel crash with reversed copy_from_user() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 55/70] pinctrl: nomadik: fix pull debug print inversion Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 38/70] mac80211: properly deal with station hashtable insert errors Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 39/70] compiler-gcc: disable -ftracer for __noclone functions Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 47/70] gpio: pca953x: Use correct u16 value for register word write Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 36/70] xen/events: Mask a moving irq Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 43/70] USB: serial: cp210x: Adding GE Healthcare Device ID Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 41/70] Btrfs: fix file/data loss caused by fsync after rename and new inode Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 33/70] mm: fix invalid node in alloc_migrate_target() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 57/70] KVM: x86: move steal time initialization to vcpu entry time Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 37/70] usb: renesas_usbhs: fix to avoid using a disabled ep in usbhsg_queue_done() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 40/70] rbd: use GFP_NOIO consistently for request allocations Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 50/70] parisc: Unbreak handling exceptions from kernel modules Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 52/70] net: bcmgenet: fix dev->stats.tx_bytes accounting Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 31/70] KVM: x86: Inject pending interrupt even if pending nmi exist Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 34/70] iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 48/70] parisc: Avoid function pointers for kernel exception routines Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 56/70] ip6_tunnel: set rtnl_link_ops before calling register_netdevice Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 45/70] virtio: virtio 1.0 cs04 spec compliance for reset Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 54/70] ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 44/70] USB: option: add "D-Link DWM-221 B1" device id Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:30 +0200 [PATCH 4.2.y-ckt 30/70] ALSA: hda - fix front mic problem for a HP desktop Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 27/70] drm/dp: move hw_mutex up the call stack Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 08/70] nfs: use file_dentry() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 24/70] [media] au0828: fix au0828_v4l2_close() dev_state race condition Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 02/70] PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 16/70] usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 10/70] drm/radeon: add another R7 370 quirk Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 20/70] ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 05/70] ALSA: hda - Apply fix for white noise on Asus N550JV, too Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 26/70] sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 23/70] USB: digi_acceleport: do sanity checking for the number of ports Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 32/70] ALSA: timer: Use mod_timer() for rearming the system timer Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 14/70] pinctrl: pistachio: fix mfio84-89 function description and pinmux. Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 15/70] pinctrl: sunxi: Fix A33 external interrupts not working Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 28/70] drm/udl: Use unlocked gem unreferencing Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 03/70] ALSA: hda - Asus N750JV external subwoofer fixup Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 12/70] powerpc/mm: Fixup preempt underflow with huge pages Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 04/70] ALSA: hda - Fix white noise on Asus N750JV headphone Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 18/70] btrfs: fix crash/invalid memory access on fsync when using overlayfs Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 29/70] ext4: add lockdep annotations for i_data_sem Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 11/70] drm/radeon: add a dpm quirk for all R7 370 parts Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 13/70] pinctrl: sh-pfc: only use dummy states for non-DT platforms Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 17/70] usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 21/70] USB: mct_u232: add sanity checking in probe Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 25/70] [media] au0828: Fix dev_state handling Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200 [PATCH 4.2.y-ckt 07/70] fs: add file_dentry() Kamal Mostafa <kamal@canonical.com> - 2016-04-12 23:40 +0200
csiph-web