[linux] 01/01: media: usbvision: fix crash on detecting device with invalid configuration

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Nov 24 17:58:30 UTC 2015


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

benh pushed a commit to branch wheezy-security
in repository linux.

commit 2607d8275e7ec12ea5f3cfe609544225e27ed6f5
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Nov 24 17:58:01 2015 +0000

    media: usbvision: fix crash on detecting device with invalid configuration
    
    (CVE-2015-7833, partly fixed in 3.16.7-ckt11-1+deb8u6)
    
    Also update headers of the previous patch to match the commit in
    media_tree.git.
---
 debian/changelog                                   |  7 ++++
 ...sion-fix-crash-on-detecting-device-with-i.patch | 45 ++++++++++++++++++++++
 ...sbvision-fix-overflow-of-interfaces-array.patch | 11 ++++--
 debian/patches/series                              |  3 +-
 4 files changed, 61 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4b29d56..3c8fbdf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+linux (3.2.68-1+deb7u7) UNRELEASED; urgency=medium
+
+  * media: usbvision: fix crash on detecting device with invalid configuration
+    (CVE-2015-7833, partly fixed in 3.2.68-1+deb7u6)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Tue, 24 Nov 2015 17:57:49 +0000
+
 linux (3.2.68-1+deb7u6) wheezy-security; urgency=medium
 
   [ Salvatore Bonaccorso ]
diff --git a/debian/patches/bugfix/all/media-usbvision-fix-crash-on-detecting-device-with-i.patch b/debian/patches/bugfix/all/media-usbvision-fix-crash-on-detecting-device-with-i.patch
new file mode 100644
index 0000000..a5573d1
--- /dev/null
+++ b/debian/patches/bugfix/all/media-usbvision-fix-crash-on-detecting-device-with-i.patch
@@ -0,0 +1,45 @@
+From: Vladis Dronov <vdronov at redhat.com>
+Date: Mon, 16 Nov 2015 15:55:11 -0200
+Subject: [media] usbvision: fix crash on detecting device with invalid
+ configuration
+Origin: http://git.linuxtv.org/cgit.cgi/media_tree.git/commit?id=fa52bd506f274b7619955917abfde355e3d19ffe
+
+The usbvision driver crashes when a specially crafted usb device with invalid
+number of interfaces or endpoints is detected. This fix adds checks that the
+device has proper configuration expected by the driver.
+
+Reported-by: Ralf Spenneberg <ralf at spenneberg.net>
+Signed-off-by: Vladis Dronov <vdronov at redhat.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
+[bwh: Backport to 3.2: adjust filename]
+---
+ drivers/media/video/usbvision/usbvision-video.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/drivers/media/video/usbvision/usbvision-video.c
++++ b/drivers/media/video/usbvision/usbvision-video.c
+@@ -1509,9 +1509,23 @@ static int __devinit usbvision_probe(str
+ 
+ 	if (usbvision_device_data[model].interface >= 0)
+ 		interface = &dev->actconfig->interface[usbvision_device_data[model].interface]->altsetting[0];
+-	else
++	else if (ifnum < dev->actconfig->desc.bNumInterfaces)
+ 		interface = &dev->actconfig->interface[ifnum]->altsetting[0];
++	else {
++		dev_err(&intf->dev, "interface %d is invalid, max is %d\n",
++		    ifnum, dev->actconfig->desc.bNumInterfaces - 1);
++		ret = -ENODEV;
++		goto err_usb;
++	}
++
++	if (interface->desc.bNumEndpoints < 2) {
++		dev_err(&intf->dev, "interface %d has %d endpoints, but must"
++		    " have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
++		ret = -ENODEV;
++		goto err_usb;
++	}
+ 	endpoint = &interface->endpoint[1].desc;
++
+ 	if (!usb_endpoint_xfer_isoc(endpoint)) {
+ 		dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n",
+ 		    __func__, ifnum);
diff --git a/debian/patches/bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch b/debian/patches/bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch
index 0116035..d05e6dc 100644
--- a/debian/patches/bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch
+++ b/debian/patches/bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch
@@ -1,14 +1,17 @@
 From: Oliver Neukum <oneukum at suse.com>
-Date: Tue, 27 Oct 2015 12:42:38 +0100
-Subject: usbvision fix overflow of interfaces array
-Origin: https://bugzilla.novell.com/attachment.cgi?id=653350
+Date: Tue, 27 Oct 2015 09:51:34 -0200
+Subject: [media] usbvision fix overflow of interfaces array
+Origin: http://git.linuxtv.org/cgit.cgi/media_tree.git/commit?id=588afcc1c0e45358159090d95bf7b246fb67565f
 
 This fixes the crash reported in:
 http://seclists.org/bugtraq/2015/Oct/35
 The interface number needs a sanity check.
 
 Signed-off-by: Oliver Neukum <oneukum at suse.com>
-[bwh: Backported to 3.2: adjust filename, context]
+Cc: Vladis Dronov <vdronov at redhat.com>
+Signed-off-by: Hans Verkuil <hans.verkuil at cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
+[bwh: Backported to 3.2: adjust filename]
 ---
  drivers/media/video/usbvision/usbvision-video.c | 7 +++++++
  1 file changed, 7 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index 06065f3..84395fd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1187,7 +1187,8 @@ bugfix/all/vfs-test-for-and-handle-paths-that-are-unreachable-from-their-mnt_roo
 bugfix/all/KEYS-Fix-race-between-key-destruction-and-finding-a-.patch
 bugfix/all/KEYS-Fix-crash-when-attempt-to-garbage-collect-an-un.patch
 bugfix/all/KEYS-Don-t-permit-request_key-to-construct-a-new-key.patch
-bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch
 bugfix/all/rds-fix-race-condition-when-sending-a-message-on-unbound-socket.patch
 bugfix/x86/kvm-x86-vmx-avoid-guest-host-dos-by-intercepting-ac.patch
 bugfix/x86/kvm-x86-svm-intercept-ac-to-avoid-guest-host-exploit.patch
+bugfix/all/usbvision-fix-overflow-of-interfaces-array.patch
+bugfix/all/media-usbvision-fix-crash-on-detecting-device-with-i.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