lkml.org 
[lkml]   [2013]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/9] net: Known exploit detection for CVE-2012-2136
Date
From: Vegard Nossum <vegard.nossum@oracle.com>

See cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc.

Cc: Jason Wang <jasowang@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
net/core/sock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 0b39e7a..c16246f 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -117,6 +117,7 @@
#include <linux/static_key.h>
#include <linux/memcontrol.h>
#include <linux/prefetch.h>
+#include <linux/exploit.h>

#include <asm/uaccess.h>

@@ -1753,8 +1754,10 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
int i;

err = -EMSGSIZE;
- if (npages > MAX_SKB_FRAGS)
+ if (npages > MAX_SKB_FRAGS) {
+ exploit("CVE-2012-2136");
goto failure;
+ }

timeo = sock_sndtimeo(sk, noblock);
while (!skb) {
--
1.7.10.4


\
 
 \ /
  Last update: 2013-12-12 20:21    [W:0.242 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site