mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-10-02 00:18:36 -04:00
Update Linux CVE patches
This commit is contained in:
parent
12b63c12b7
commit
3989a1b20b
958 changed files with 21074 additions and 397 deletions
34
Patches/Linux_CVEs/CVE-2012-6657/ANY/0.patch
Normal file
34
Patches/Linux_CVEs/CVE-2012-6657/ANY/0.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 3e10986d1d698140747fcfc2761ec9cb64c1d582 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Mon, 24 Sep 2012 07:00:11 +0000
|
||||
Subject: net: guard tcp_set_keepalive() to tcp sockets
|
||||
|
||||
Its possible to use RAW sockets to get a crash in
|
||||
tcp_set_keepalive() / sk_reset_timer()
|
||||
|
||||
Fix is to make sure socket is a SOCK_STREAM one.
|
||||
|
||||
Reported-by: Dave Jones <davej@redhat.com>
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/core/sock.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/core/sock.c b/net/core/sock.c
|
||||
index 3057920..a6000fb 100644
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -691,7 +691,8 @@ set_rcvbuf:
|
||||
|
||||
case SO_KEEPALIVE:
|
||||
#ifdef CONFIG_INET
|
||||
- if (sk->sk_protocol == IPPROTO_TCP)
|
||||
+ if (sk->sk_protocol == IPPROTO_TCP &&
|
||||
+ sk->sk_type == SOCK_STREAM)
|
||||
tcp_set_keepalive(sk, valbool);
|
||||
#endif
|
||||
sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool);
|
||||
--
|
||||
cgit v1.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue