From: Vegard Nossum <vegard.nos...@oracle.com>

See c903f0456bc69176912dee6dd25c6a66ee1aed00.

Cc: Alan Cox <a...@linux.intel.com>
Cc: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nos...@oracle.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to