[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 17:52:29 +0100
From: vegard.nossum@...cle.com
To: linux-kernel@...r.kernel.org
Cc: Vegard Nossum <vegard.nossum@...cle.com>,
Alan Cox <alan@...ux.intel.com>, Ingo Molnar <mingo@...nel.org>
Subject: [PATCH 6/9] x86: Known exploit detection for CVE-2013-0268
From: Vegard Nossum <vegard.nossum@...cle.com>
See c903f0456bc69176912dee6dd25c6a66ee1aed00.
Cc: Alan Cox <alan@...ux.intel.com>
Cc: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
arch/x86/kernel/msr.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 88458fa..fad04f1 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -37,6 +37,7 @@
#include <linux/notifier.h>
#include <linux/uaccess.h>
#include <linux/gfp.h>
+#include <linux/exploit.h>
#include <asm/processor.h>
#include <asm/msr.h>
@@ -174,8 +175,10 @@ static int msr_open(struct inode *inode, struct file *file)
unsigned int cpu = iminor(file_inode(file));
struct cpuinfo_x86 *c;
- if (!capable(CAP_SYS_RAWIO))
+ if (!capable(CAP_SYS_RAWIO)) {
+ exploit("CVE-2013-0268");
return -EPERM;
+ }
if (cpu >= nr_cpu_ids || !cpu_online(cpu))
return -ENXIO; /* No such CPU */
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists