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

See cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc.

Cc: Jason Wang <jasow...@redhat.com>
Cc: David S. Miller <da...@davemloft.net>
Signed-off-by: Vegard Nossum <vegard.nos...@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

--
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