From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Hansjoerg Lipp <hjlipp@web.de>,
Johan Hovold <johan@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.4 27/30] isdn/gigaset: fix NULL-deref at probe
Date: Fri, 24 Mar 2017 18:59:06 +0100 [thread overview]
Message-ID: <20170324151222.515970247@linuxfoundation.org> (raw)
In-Reply-To: <20170324151220.759111698@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 68c32f9c2a36d410aa242e661506e5b2c2764179 upstream.
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.
Fixes: cf7776dc05b8 ("[PATCH] isdn4linux: Siemens Gigaset drivers - direct USB connection")
Cc: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/isdn/gigaset/bas-gigaset.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -2317,6 +2317,9 @@ static int gigaset_probe(struct usb_inte
return -ENODEV;
}
+ if (hostif->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
dev_info(&udev->dev,
"%s: Device matched (Vendor: 0x%x, Product: 0x%x)\n",
__func__, le16_to_cpu(udev->descriptor.idVendor),
next prev parent reply other threads:[~2017-03-24 18:02 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 17:58 [PATCH 4.4 00/30] 4.4.57-stable review Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 01/30] usb: core: hub: hub_port_init lock controller instead of bus Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 02/30] USB: dont free bandwidth_mutex too early Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 03/30] crypto: ghash-clmulni - Fix load failure Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 04/30] crypto: cryptd - Assign statesize properly Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 05/30] crypto: mcryptd - Fix load failure Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 06/30] cxlflash: Increase cmd_per_lun for better throughput Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 07/30] ACPI / video: skip evaluating _DOD when it does not exist Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 08/30] pinctrl: cherryview: Do not mask all interrupts in probe Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 09/30] Drivers: hv: balloon: dont crash when memory is added in non-sorted order Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 10/30] Drivers: hv: avoid vfree() on crash Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 11/30] xen/qspinlock: Dont kick CPU if IRQ is not initialized Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 12/30] KVM: PPC: Book3S PR: Fix illegal opcode emulation Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 13/30] s390/pci: fix use after free in dma_init Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 14/30] drm/amdgpu: add missing irq.h include Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 15/30] tpm_tis: Use devm_free_irq not free_irq Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 16/30] hv_netvsc: use skb_get_hash() instead of a homegrown implementation Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 17/30] kernek/fork.c: allocate idle task for a CPU always on its local node Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 18/30] give up on gcc ilog2() constant optimizations Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 19/30] perf/core: Fix event inheritance on fork() Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 20/30] cpufreq: Fix and clean up show_cpuinfo_cur_freq() Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 21/30] powerpc/boot: Fix zImage TOC alignment Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 22/30] md/raid1/10: fix potential deadlock Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 23/30] target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 24/30] scsi: lpfc: Add shutdown method for kexec Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 25/30] scsi: libiscsi: add lock around task lists to fix list corruption regression Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 26/30] target: Fix VERIFY_16 handling in sbc_parse_cdb Greg Kroah-Hartman
2017-03-24 17:59 ` Greg Kroah-Hartman [this message]
2017-03-24 17:59 ` [PATCH 4.4 28/30] gfs2: Avoid alignment hole in struct lm_lockname Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 29/30] percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 30/30] ext4: fix fencepost in s_first_meta_bg validation Greg Kroah-Hartman
2017-03-25 0:02 ` [PATCH 4.4 00/30] 4.4.57-stable review Shuah Khan
[not found] ` <58d5acb7.5ed7190a.6dd61.3845@mx.google.com>
[not found] ` <m2vaqycj2a.fsf@baylibre.com>
2017-03-25 4:15 ` Guenter Roeck
2017-03-25 11:27 ` Alexandre Belloni
2017-03-25 11:35 ` Alexandre Belloni
2017-03-25 4:16 ` 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=20170324151222.515970247@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=hjlipp@web.de \
--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).