wok diff linux/stuff/linux-CVE-2016-5696.u @ rev 19614
Up: gmp (6.1.2)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Mon Jan 09 19:48:10 2017 +0000 (2017-01-09) |
parents | ccc74276c193 |
children |
line diff
1.1 --- a/linux/stuff/linux-CVE-2016-5696.u Sat Aug 13 09:04:52 2016 +0200 1.2 +++ b/linux/stuff/linux-CVE-2016-5696.u Mon Jan 09 19:48:10 2017 +0000 1.3 @@ -1,4 +1,4 @@ 1.4 -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758 1.5 +based on http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758 1.6 --- linux-3.2.71/net/ipv4/tcp_input.c 1.7 +++ linux-3.2.71/net/ipv4/tcp_input.c 1.8 @@ -87,7 +87,7 @@ 1.9 @@ -10,12 +10,15 @@ 1.10 1.11 int sysctl_tcp_stdurg __read_mostly; 1.12 int sysctl_tcp_rfc1337 __read_mostly; 1.13 -@@ -3715,13 +3715,17 @@ 1.14 +@@ -3715,13 +3715,20 @@ 1.15 /* unprotected vars, we dont care of overwrites */ 1.16 static u32 challenge_timestamp; 1.17 static unsigned int challenge_count; 1.18 - u32 now = jiffies / HZ; 1.19 + u32 count, now = jiffies / HZ; 1.20 ++#define READ_ONCE(a) a 1.21 ++#define WRITE_ONCE(a,b) (a = b) 1.22 ++#define prandom_u32_max(a) (net_random() % (a)) 1.23 1.24 if (now != challenge_timestamp) { 1.25 + u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;