[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 17:52:27 +0100
From: vegard.nossum@...cle.com
To: linux-kernel@...r.kernel.org
Cc: Vegard Nossum <vegard.nossum@...cle.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 4/9] net: Known exploit detection for CVE-2012-2136
From: Vegard Nossum <vegard.nossum@...cle.com>
See cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc.
Cc: Jason Wang <jasowang@...hat.com>
Cc: David S. Miller <davem@...emloft.net>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.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
--
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