# HG changeset patch # User Pascal Bellard # Date 1471076590 -7200 # Node ID 707e4ea3a113b5654b778339ff814d90d11c00fb # Parent ccc74276c1934f93af8c0db9ae4ea6cc4c5ae172 linux: CVE-2016-5696 (again) diff -r ccc74276c193 -r 707e4ea3a113 linux/stuff/linux-CVE-2016-5696.u --- a/linux/stuff/linux-CVE-2016-5696.u Sat Aug 13 09:04:52 2016 +0200 +++ b/linux/stuff/linux-CVE-2016-5696.u Sat Aug 13 10:23:10 2016 +0200 @@ -1,4 +1,4 @@ -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758 +based on http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758 --- linux-3.2.71/net/ipv4/tcp_input.c +++ linux-3.2.71/net/ipv4/tcp_input.c @@ -87,7 +87,7 @@ @@ -10,12 +10,15 @@ int sysctl_tcp_stdurg __read_mostly; int sysctl_tcp_rfc1337 __read_mostly; -@@ -3715,13 +3715,17 @@ +@@ -3715,13 +3715,20 @@ /* unprotected vars, we dont care of overwrites */ static u32 challenge_timestamp; static unsigned int challenge_count; - u32 now = jiffies / HZ; + u32 count, now = jiffies / HZ; ++#define READ_ONCE(a) a ++#define WRITE_ONCE(a,b) (a = b) ++#define prandom_u32_max(a) (net_random() % (a)) if (now != challenge_timestamp) { + u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;