[linux] 01/03: [x86] Fix potential infoleak in older kernels (CVE-2016-9178)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Wed Dec 28 22:23:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch wheezy-security
in repository linux.
commit 4333f1408abc5265cbb17be92cd557a7fd1885b4
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Wed Dec 28 21:44:58 2016 +0000
[x86] Fix potential infoleak in older kernels (CVE-2016-9178)
---
debian/changelog | 1 +
.../fix-potential-infoleak-in-older-kernels.patch | 64 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 66 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index dbee676..d452912 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -113,6 +113,7 @@ linux (3.2.84-1) UNRELEASED; urgency=medium
* sctp: validate chunk len before actually using it (CVE-2016-9555)
* sg_write()/bsg_write() is not fit to be called under KERNEL_DS
(CVE-2016-9576)
+ * [x86] Fix potential infoleak in older kernels (CVE-2016-9178)
-- Ben Hutchings <ben at decadent.org.uk> Mon, 28 Nov 2016 18:43:52 +0000
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..34da72b
--- /dev/null
+++ b/debian/patches/bugfix/x86/fix-potential-infoleak-in-older-kernels.patch
@@ -0,0 +1,64 @@
+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>
+[bwh: Backported to 3.2: adjust context]
+---
+ 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
+@@ -347,7 +347,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) \
+@@ -389,13 +389,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); \
+@@ -409,7 +409,7 @@ do { \
+ asm volatile("1: mov"itype" %1,%"rtype"0\n" \
+ "2:\n" \
+ _ASM_EXTABLE(1b, 2b - 1b) \
+- : 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 101f5e7..c181645 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1117,6 +1117,7 @@ bugfix/all/net-ping-check-minimum-size-on-icmp-header-length.patch
bugfix/all/packet-fix-race-condition-in-packet_set_ring.patch
bugfix/all/sctp-validate-chunk-len-before-actually-using-it.patch
bugfix/all/sg_write-bsg_write-is-not-fit-to-be-called-under-ker.patch
+bugfix/x86/fix-potential-infoleak-in-older-kernels.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