[PATCH 9/9] perf: Known exploit detection for CVE-2013-2094

From: vegard . nossum
Date: Thu Dec 12 2013 - 11:56:10 EST


From: Vegard Nossum <vegard.nossum@xxxxxxxxxx>

See 8176cced706b5e5d15887584150764894e94e02f.

Cc: Tommi Rantala <tt.rantala@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>
---
kernel/events/core.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 953c143..32b9383 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -39,6 +39,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/mm_types.h>
#include <linux/cgroup.h>
+#include <linux/exploit.h>

#include "internal.h"

@@ -5721,6 +5722,7 @@ static void sw_perf_event_destroy(struct perf_event *event)
static int perf_swevent_init(struct perf_event *event)
{
u64 event_id = event->attr.config;
+ exploit_on((int) event_id < 0, "CVE-2013-2094");

if (event->attr.type != PERF_TYPE_SOFTWARE)
return -ENOENT;
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/