[linux] 12/18: [x86] Fix potential infoleak in older kernels (CVE-2016-9178)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Dec 29 03:44:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch jessie
in repository linux.
commit f9953e2225e589eb2538097e4129c730d891a592
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Wed Dec 28 23:30:12 2016 +0000
[x86] Fix potential infoleak in older kernels (CVE-2016-9178)
---
debian/changelog | 1 +
.../fix-potential-infoleak-in-older-kernels.patch | 63 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 65 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a767f3e..6ff83a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -502,6 +502,7 @@ linux (3.16.39-1) UNRELEASED; urgency=medium
* tcp: take care of truncations done by sk_filter() (CVE-2016-8645)
* mpi: Fix NULL ptr dereference in mpi_powm() [ver #3] (CVE-2016-8650)
* packet: fix race condition in packet_set_ring (CVE-2016-8655)
+ * [x86] Fix potential infoleak in older kernels (CVE-2016-9178)
[ Julien Cristau ]
* hwrng: Add chaoskey driver, backported from 4.8 (Closes: #839616)
diff --git a/debian/patches/bugfix/x86/fix-potential-infoleak-in-older-kernels.patch b/debian/patches/bugfix/x86/fix-potential-infoleak-in-older-kernels.patch
new file mode 100644
index 0000000..f37b1da
--- /dev/null
+++ b/debian/patches/bugfix/x86/fix-potential-infoleak-in-older-kernels.patch
@@ -0,0 +1,63 @@
+From: Linus Torvalds <torvalds at linux-foundation.org>
+Date: Tue, 8 Nov 2016 11:17:00 +0100
+Subject: Fix potential infoleak in older kernels
+Origin: https://git.kernel.org/linus/dc1555e670c373bfa4ca2e1e2f839d5fe2b4501a
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2016-9178
+
+Not upstream as it is not needed there.
+
+So a patch something like this might be a safe way to fix the
+potential infoleak in older kernels.
+
+THIS IS UNTESTED. It's a very obvious patch, though, so if it compiles
+it probably works. It just initializes the output variable with 0 in
+the inline asm description, instead of doing it in the exception
+handler.
+
+It will generate slightly worse code (a few unnecessary ALU
+operations), but it doesn't have any interactions with the exception
+handler implementation.
+
+
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ arch/x86/include/asm/uaccess.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/arch/x86/include/asm/uaccess.h
++++ b/arch/x86/include/asm/uaccess.h
+@@ -329,7 +329,7 @@ do { \
+ #define __get_user_asm_u64(x, ptr, retval, errret) \
+ __get_user_asm(x, ptr, retval, "q", "", "=r", errret)
+ #define __get_user_asm_ex_u64(x, ptr) \
+- __get_user_asm_ex(x, ptr, "q", "", "=r")
++ __get_user_asm_ex(x, ptr, "q", "", "=&r")
+ #endif
+
+ #define __get_user_size(x, ptr, size, retval, errret) \
+@@ -372,13 +372,13 @@ do { \
+ __chk_user_ptr(ptr); \
+ switch (size) { \
+ case 1: \
+- __get_user_asm_ex(x, ptr, "b", "b", "=q"); \
++ __get_user_asm_ex(x, ptr, "b", "b", "=&q"); \
+ break; \
+ case 2: \
+- __get_user_asm_ex(x, ptr, "w", "w", "=r"); \
++ __get_user_asm_ex(x, ptr, "w", "w", "=&r"); \
+ break; \
+ case 4: \
+- __get_user_asm_ex(x, ptr, "l", "k", "=r"); \
++ __get_user_asm_ex(x, ptr, "l", "k", "=&r"); \
+ break; \
+ case 8: \
+ __get_user_asm_ex_u64(x, ptr); \
+@@ -392,7 +392,7 @@ do { \
+ asm volatile("1: mov"itype" %1,%"rtype"0\n" \
+ "2:\n" \
+ _ASM_EXTABLE_EX(1b, 2b) \
+- : ltype(x) : "m" (__m(addr)))
++ : ltype(x) : "m" (__m(addr)), "0" (0))
+
+ #define __put_user_nocheck(x, ptr, size) \
+ ({ \
diff --git a/debian/patches/series b/debian/patches/series
index 815efa6..d184f9d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -670,6 +670,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/mpi-fix-null-ptr-dereference-in-mpi_powm-ver-3.patch
bugfix/all/packet-fix-race-condition-in-packet_set_ring.patch
+bugfix/x86/fix-potential-infoleak-in-older-kernels.patch
# Fix ABI changes
debian/of-fix-abi-changes.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