wok-6.x rev 19377
linux: CVE-2016-5696 (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 13 10:23:10 2016 +0200 (2016-08-13) |
parents | ccc74276c193 |
children | 1dc665e06c3e |
files | linux/stuff/linux-CVE-2016-5696.u |
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 Sat Aug 13 10:23:10 2016 +0200 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;