[linux] 03/07: media: info leak in __media_device_enum_links() (CVE-2014-9895)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Feb 21 21:40:58 UTC 2017


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

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

commit 5a236da5bf44c2fb32858cd29f594fb996fda614
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Feb 21 20:10:06 2017 +0000

    media: info leak in __media_device_enum_links() (CVE-2014-9895)
---
 debian/changelog                                   |  1 +
 ...ia-info-leak-in-__media_device_enum_links.patch | 36 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 38 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 163bae7..79f8483 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ linux (3.2.84-2) UNRELEASED; urgency=high
   [ Ben Hutchings ]
   * [arm*] dma-mapping: don't allow DMA mappings to be marked executable
     (CVE-2014-9888)
+  * media: info leak in __media_device_enum_links() (CVE-2014-9895)
 
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 18 Feb 2017 18:26:58 +0100
 
diff --git a/debian/patches/bugfix/all/media-info-leak-in-__media_device_enum_links.patch b/debian/patches/bugfix/all/media-info-leak-in-__media_device_enum_links.patch
new file mode 100644
index 0000000..ae156f9
--- /dev/null
+++ b/debian/patches/bugfix/all/media-info-leak-in-__media_device_enum_links.patch
@@ -0,0 +1,36 @@
+From: Dan Carpenter <dan.carpenter at oracle.com>
+Date: Sat, 13 Apr 2013 06:32:15 -0300
+Subject: [media] media: info leak in __media_device_enum_links()
+Origin: https://git.kernel.org/linus/c88e739b1fad662240e99ecbd0bdaac871717987
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2014-9895
+
+These structs have holes and reserved struct members which aren't
+cleared.  I've added a memset() so we don't leak stack information.
+
+Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
+Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/media/media-device.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/media/media-device.c
++++ b/drivers/media/media-device.c
+@@ -142,6 +142,8 @@ static long media_device_enum_links(stru
+ 
+ 		for (p = 0; p < entity->num_pads; p++) {
+ 			struct media_pad_desc pad;
++
++			memset(&pad, 0, sizeof(pad));
+ 			media_device_kpad_to_upad(&entity->pads[p], &pad);
+ 			if (copy_to_user(&links.pads[p], &pad, sizeof(pad)))
+ 				return -EFAULT;
+@@ -159,6 +161,7 @@ static long media_device_enum_links(stru
+ 			if (entity->links[l].source->entity != entity)
+ 				continue;
+ 
++			memset(&link, 0, sizeof(link));
+ 			media_device_kpad_to_upad(entity->links[l].source,
+ 						  &link.source);
+ 			media_device_kpad_to_upad(entity->links[l].sink,
diff --git a/debian/patches/series b/debian/patches/series
index e4cecd5..87426fe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1128,6 +1128,7 @@ bugfix/all/tcp-take-care-of-truncations-done-by-sk_filter.patch
 bugfix/all/dccp-fix-freeing-skb-too-early-for-IPV6_RECVPKTINFO.patch
 bugfix/all/sctp-avoid-BUG_ON-on-sctp_wait_for_sndbuf.patch
 bugfix/arm/arm-dma-mapping-don-t-allow-dma-mappings-to-be-marked-executable.patch
+bugfix/all/media-info-leak-in-__media_device_enum_links.patch
 
 # ABI maintenance
 debian/perf-hide-abi-change-in-3.2.30.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