[linux] 02/07: [arm*] dma-mapping: don't allow DMA mappings to be marked executable (CVE-2014-9888)

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 57c3049c728fba18502a5c163a51e5a6ce5905eb
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Feb 21 20:08:21 2017 +0000

    [arm*] dma-mapping: don't allow DMA mappings to be marked executable (CVE-2014-9888)
---
 debian/changelog                                   |  5 +++
 ...llow-dma-mappings-to-be-marked-executable.patch | 37 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 43 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8f6fb0b..163bae7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
 linux (3.2.84-2) UNRELEASED; urgency=high
 
+  [ Salvatore Bonaccorso ]
   * dccp: fix freeing skb too early for IPV6_RECVPKTINFO (CVE-2017-6074)
   * sctp: avoid BUG_ON on sctp_wait_for_sndbuf (CVE-2017-5986)
 
+  [ Ben Hutchings ]
+  * [arm*] dma-mapping: don't allow DMA mappings to be marked executable
+    (CVE-2014-9888)
+
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 18 Feb 2017 18:26:58 +0100
 
 linux (3.2.84-1) wheezy-security; urgency=high
diff --git a/debian/patches/bugfix/arm/arm-dma-mapping-don-t-allow-dma-mappings-to-be-marked-executable.patch b/debian/patches/bugfix/arm/arm-dma-mapping-don-t-allow-dma-mappings-to-be-marked-executable.patch
new file mode 100644
index 0000000..1ba852c
--- /dev/null
+++ b/debian/patches/bugfix/arm/arm-dma-mapping-don-t-allow-dma-mappings-to-be-marked-executable.patch
@@ -0,0 +1,37 @@
+From: Russell King <rmk+kernel at arm.linux.org.uk>
+Date: Wed, 23 Oct 2013 16:14:59 +0100
+Subject: ARM: dma-mapping: don't allow DMA mappings to be marked executable
+Origin: https://git.kernel.org/linux/0ea1ec713f04bdfac343c9702b21cd3a7c711826
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2014-9888
+
+DMA mapping permissions were being derived from pgprot_kernel directly
+without using PAGE_KERNEL.  This causes them to be marked with executable
+permission, which is not what we want.  Fix this.
+
+Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
+[bwh: Backported to 3.2: adjust context]
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ arch/arm/mm/dma-mapping.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/mm/dma-mapping.c
++++ b/arch/arm/mm/dma-mapping.c
+@@ -374,7 +374,7 @@ dma_alloc_coherent(struct device *dev, s
+ 		return memory;
+ 
+ 	return __dma_alloc(dev, size, handle, gfp,
+-			   pgprot_dmacoherent(pgprot_kernel));
++			   pgprot_dmacoherent(PAGE_KERNEL));
+ }
+ EXPORT_SYMBOL(dma_alloc_coherent);
+ 
+@@ -386,7 +386,7 @@ void *
+ dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
+ {
+ 	return __dma_alloc(dev, size, handle, gfp,
+-			   pgprot_writecombine(pgprot_kernel));
++			   pgprot_writecombine(PAGE_KERNEL));
+ }
+ EXPORT_SYMBOL(dma_alloc_writecombine);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 91ddbfc..e4cecd5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1127,6 +1127,7 @@ bugfix/all/dccp-limit-sk_filter-trim-to-payload.patch
 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
 
 # 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