Patch "[PATCH 1/8] tcp: make challenge acks less predictable" has been added to the 3.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
[PATCH 1/8] tcp: make challenge acks less predictable
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tcp-make-challenge-acks-less-predictable.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
a0d876bf464ea9abeb3f74aaf6737b6bcfd650c2Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Sun, 10 Jul 2016 10:04:02 +0200
Subject: [PATCH 1/8] tcp: make challenge acks less predictable
Status: RO
Content-Length: 2797
Lines: 78
[ Upstream commit 75ff39ccc1bd5d3c455b6822ab09e533c551f758 ]
Yue Cao claims that current host rate limiting of challenge ACKS (RFC 5961) could leak enough information to allow a patient attacker to hijack TCP sessions. He will soon provide details in an academic paper.
This patch increases the default limit from 100 to 1000, and adds some randomization so that the attacker can no longer hijack sessions without spending a considerable amount of probes.
Based on initial analysis and patch from Linus.
Note that we also have per socket rate limiting, so it is tempting to remove the host limit in the future.
v2: randomize the count of challenge acks per second, not the period.
--- net/ipv4/tcp_input.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
net/ipv4/tcp_input.c +9 -3
@@ -87,7 +87,7 @@ int sysctl_tcp_adv_win_scale __read_mostEXPORT_SYMBOL (sysctl_tcp_adv_win_scale);/* rfc5961 challenge ack rate limiting */ -int sysctl_tcp_challenge_ack_limit =100 ; +int sysctl_tcp_challenge_ack_limit =1000 ;int sysctl_tcp_stdurg__read_mostly ;int sysctl_tcp_rfc1337__read_mostly ;
@@ -3293,12 +3293,18 @@ static void tcp_send_challenge_ack(strucstatic u32 challenge_timestamp;static unsigned int challenge_count;u32 now = jiffies /HZ ; +u32 count;if (now != challenge_timestamp) { +u32 half = (sysctl_tcp_challenge_ack_limit +1 ) >>1 ; + challenge_timestamp = now; - challenge_count =0 ; + challenge_count = half + +prandom_u32_max (sysctl_tcp_challenge_ack_limit); } -if (++challenge_count <= sysctl_tcp_challenge_ack_limit) { + count = challenge_count; +if (count >0 ) { + challenge_count = count -1 ;NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_TCPCHALLENGEACK );tcp_send_ack (sk); }
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/tcp-make-challenge-acks-less-predictable.patch