* Patch "cdc-acm: fix NULL pointer reference" has been added to the 4.4-stable tree
@ 2016-04-17 10:32 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-17 10:32 UTC (permalink / raw)
To: oneukum, davem, galkin-vv, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
cdc-acm: fix NULL pointer reference
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:
cdc-acm-fix-null-pointer-reference.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 <stable@vger.kernel.org> know about it.
>From 29c6dd591bbd592472247441de9fa694acdabae8 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Thu, 7 Jan 2016 11:01:00 +0100
Subject: cdc-acm: fix NULL pointer reference
From: Oliver Neukum <oneukum@suse.com>
commit 29c6dd591bbd592472247441de9fa694acdabae8 upstream.
The union descriptor must be checked. Its usage was conditional
before the parser was introduced. This is important, because
many RNDIS device, which also use the common parser, have
bogus extra descriptors.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Tested-by: Vasily Galkin <galkin-vv@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/usb/cdc_ether.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -160,6 +160,12 @@ int usbnet_generic_cdc_bind(struct usbne
info->u = header.usb_cdc_union_desc;
info->header = header.usb_cdc_header_desc;
info->ether = header.usb_cdc_ether_desc;
+ if (!info->u) {
+ if (rndis)
+ goto skip;
+ else /* in that case a quirk is mandatory */
+ goto bad_desc;
+ }
/* we need a master/control interface (what we're
* probed with) and a slave/data interface; union
* descriptors sort this all out.
@@ -256,7 +262,7 @@ skip:
goto bad_desc;
}
- } else if (!info->header || !info->u || (!rndis && !info->ether)) {
+ } else if (!info->header || (!rndis && !info->ether)) {
dev_dbg(&intf->dev, "missing cdc %s%s%sdescriptor\n",
info->header ? "" : "header ",
info->u ? "" : "union ",
Patches currently in stable-queue which might be from oneukum@suse.com are
queue-4.4/cdc-acm-fix-null-pointer-reference.patch
queue-4.4/usbnet-cleanup-after-bind-in-probe.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-17 11:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 10:32 Patch "cdc-acm: fix NULL pointer reference" has been added to the 4.4-stable tree gregkh
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).