[linux] 05/06: net: cdc_ether: fix divide by 0 on bad descriptors (CVE-2017-16649)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Nov 16 18:16:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 91a7ba9320a34546ff5ea72ea2ad7ceb761f6f1b
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Nov 16 18:12:24 2017 +0000

    net: cdc_ether: fix divide by 0 on bad descriptors (CVE-2017-16649)
---
 debian/changelog                                   |  1 +
 ..._ether-fix-divide-by-0-on-bad-descriptors.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 33 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2973a83..b2eafdf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -130,6 +130,7 @@ linux (4.13.13-1) UNRELEASED; urgency=medium
   * media: imon: Fix null-ptr-deref in imon_probe (CVE-2017-16537)
   * media: dib0700: fix invalid dvb_detach argument (CVE-2017-16646)
   * net: usb: asix: fill null-ptr-deref in asix_suspend (CVE-2017-16647)
+  * net: cdc_ether: fix divide by 0 on bad descriptors (CVE-2017-16649)
 
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 04 Nov 2017 09:54:41 +0100
 
diff --git a/debian/patches/bugfix/all/net-cdc_ether-fix-divide-by-0-on-bad-descriptors.patch b/debian/patches/bugfix/all/net-cdc_ether-fix-divide-by-0-on-bad-descriptors.patch
new file mode 100644
index 0000000..b9b5a28
--- /dev/null
+++ b/debian/patches/bugfix/all/net-cdc_ether-fix-divide-by-0-on-bad-descriptors.patch
@@ -0,0 +1,31 @@
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn at mork.no>
+Date: Mon, 6 Nov 2017 15:37:22 +0100
+Subject: net: cdc_ether: fix divide by 0 on bad descriptors
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/linus/2cb80187ba065d7decad7c6614e35e07aec8a974
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-16649
+
+Setting dev->hard_mtu to 0 will cause a divide error in
+usbnet_probe. Protect against devices with bogus CDC Ethernet
+functional descriptors by ignoring a zero wMaxSegmentSize.
+
+Signed-off-by: Bjørn Mork <bjorn at mork.no>
+Acked-by: Oliver Neukum <oneukum at suse.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/cdc_ether.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/cdc_ether.c
++++ b/drivers/net/usb/cdc_ether.c
+@@ -221,7 +221,7 @@ skip:
+ 			goto bad_desc;
+ 	}
+ 
+-	if (header.usb_cdc_ether_desc) {
++	if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) {
+ 		dev->hard_mtu = le16_to_cpu(info->ether->wMaxSegmentSize);
+ 		/* because of Zaurus, we may be ignoring the host
+ 		 * side link address we were given.
diff --git a/debian/patches/series b/debian/patches/series
index 11f4def..c645ce4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -122,6 +122,7 @@ bugfix/all/media-cx231xx-cards-fix-null-deref-on-missing-associ.patch
 bugfix/all/media-imon-fix-null-ptr-deref-in-imon_probe.patch
 bugfix/all/media-dib0700-fix-invalid-dvb_detach-argument.patch
 bugfix/all/net-usb-asix-fill-null-ptr-deref-in-asix_suspend.patch
+bugfix/all/net-cdc_ether-fix-divide-by-0-on-bad-descriptors.patch
 
 # Fix exported symbol versions
 bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list