Linux v4.6.7
This commit is contained in:
parent
c3c83b9427
commit
389254406e
|
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||
%if 0%{?released_kernel}
|
||||
|
||||
# Do we have a -stable update to apply?
|
||||
%define stable_update 6
|
||||
%define stable_update 7
|
||||
# Set rpm version accordingly
|
||||
%if 0%{?stable_update}
|
||||
%define stablerev %{stable_update}
|
||||
|
@ -637,10 +637,6 @@ Patch815: 0015-drm-i915-gen9-Calculate-watermarks-during-atomic-che.patch
|
|||
Patch816: 0016-drm-i915-gen9-Reject-display-updates-that-exceed-wm-.patch
|
||||
Patch817: 0017-drm-i915-Remove-wm_config-from-dev_priv-intel_atomic.patch
|
||||
|
||||
#CVE-2016-5389 CVE-2016-5969 rhbz 1354708 1355615
|
||||
Patch835: tcp-make-challenge-acks-less-predictable.patch
|
||||
Patch839: tcp-enable-per-socket-rate-limiting-of-all-challenge.patch
|
||||
|
||||
# https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/message/A4YCP7OGMX6JLFT5V44H57GOMAQLC3M4/
|
||||
Patch836: drm-amdgpu-Disable-RPM-helpers-while-reprobing.patch
|
||||
Patch837: drm-i915-Acquire-audio-powerwell-for-HD-Audio-regist.patch
|
||||
|
@ -2180,6 +2176,9 @@ fi
|
|||
#
|
||||
#
|
||||
%changelog
|
||||
* Thu Aug 16 2016 Laura Abbott <labbott@fedoraproject.org> - 4.6.7-300
|
||||
- Linux v4.6.7
|
||||
|
||||
* Thu Aug 11 2016 Laura Abbott <labbott@fedoraproject.org>
|
||||
- Fix for crash seen with Open Stack (rhbz 1361414)
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1,3 +1,3 @@
|
|||
d2927020e24a76da4ab482a8bc3e9ef3 linux-4.6.tar.xz
|
||||
fd23b14b9d474c3dfacb6e8ee82d3a51 perf-man-4.6.tar.gz
|
||||
84f23eb772635b1348d3ea7c5bd67930 patch-4.6.6.xz
|
||||
3fc1fcb7ef83c4ef4c05d8bd57e1b985 patch-4.6.7.xz
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
From 8272c58d085e5611a7f839fa32e148ae62446375 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Baron <jbaron@akamai.com>
|
||||
Date: Thu, 14 Jul 2016 11:38:40 -0400
|
||||
Subject: [PATCH] tcp: enable per-socket rate limiting of all 'challenge acks'
|
||||
|
||||
The per-socket rate limit for 'challenge acks' was introduced in the
|
||||
context of limiting ack loops:
|
||||
|
||||
commit f2b2c582e824 ("tcp: mitigate ACK loops for connections as tcp_sock")
|
||||
|
||||
And I think it can be extended to rate limit all 'challenge acks' on a
|
||||
per-socket basis.
|
||||
|
||||
Since we have the global tcp_challenge_ack_limit, this patch allows for
|
||||
tcp_challenge_ack_limit to be set to a large value and effectively rely on
|
||||
the per-socket limit, or set tcp_challenge_ack_limit to a lower value and
|
||||
still prevents a single connections from consuming the entire challenge ack
|
||||
quota.
|
||||
|
||||
It further moves in the direction of eliminating the global limit at some
|
||||
point, as Eric Dumazet has suggested. This a follow-up to:
|
||||
Subject: tcp: make challenge acks less predictable
|
||||
|
||||
Cc: Eric Dumazet <edumazet@google.com>
|
||||
Cc: David S. Miller <davem@davemloft.net>
|
||||
Cc: Neal Cardwell <ncardwell@google.com>
|
||||
Cc: Yuchung Cheng <ycheng@google.com>
|
||||
Cc: Yue Cao <ycao009@ucr.edu>
|
||||
Signed-off-by: Jason Baron <jbaron@akamai.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/ipv4/tcp_input.c | 39 ++++++++++++++++++++++-----------------
|
||||
1 file changed, 22 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
|
||||
index 8c011359646b..796315104ad7 100644
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -3423,6 +3423,23 @@ static int tcp_ack_update_window(struct sock *sk, const struct sk_buff *skb, u32
|
||||
return flag;
|
||||
}
|
||||
|
||||
+static bool __tcp_oow_rate_limited(struct net *net, int mib_idx,
|
||||
+ u32 *last_oow_ack_time)
|
||||
+{
|
||||
+ if (*last_oow_ack_time) {
|
||||
+ s32 elapsed = (s32)(tcp_time_stamp - *last_oow_ack_time);
|
||||
+
|
||||
+ if (0 <= elapsed && elapsed < sysctl_tcp_invalid_ratelimit) {
|
||||
+ NET_INC_STATS(net, mib_idx);
|
||||
+ return true; /* rate-limited: don't send yet! */
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ *last_oow_ack_time = tcp_time_stamp;
|
||||
+
|
||||
+ return false; /* not rate-limited: go ahead, send dupack now! */
|
||||
+}
|
||||
+
|
||||
/* Return true if we're currently rate-limiting out-of-window ACKs and
|
||||
* thus shouldn't send a dupack right now. We rate-limit dupacks in
|
||||
* response to out-of-window SYNs or ACKs to mitigate ACK loops or DoS
|
||||
@@ -3436,21 +3453,9 @@ bool tcp_oow_rate_limited(struct net *net, const struct sk_buff *skb,
|
||||
/* Data packets without SYNs are not likely part of an ACK loop. */
|
||||
if ((TCP_SKB_CB(skb)->seq != TCP_SKB_CB(skb)->end_seq) &&
|
||||
!tcp_hdr(skb)->syn)
|
||||
- goto not_rate_limited;
|
||||
-
|
||||
- if (*last_oow_ack_time) {
|
||||
- s32 elapsed = (s32)(tcp_time_stamp - *last_oow_ack_time);
|
||||
-
|
||||
- if (0 <= elapsed && elapsed < sysctl_tcp_invalid_ratelimit) {
|
||||
- NET_INC_STATS_BH(net, mib_idx);
|
||||
- return true; /* rate-limited: don't send yet! */
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- *last_oow_ack_time = tcp_time_stamp;
|
||||
+ return false;
|
||||
|
||||
-not_rate_limited:
|
||||
- return false; /* not rate-limited: go ahead, send dupack now! */
|
||||
+ return __tcp_oow_rate_limited(net, mib_idx, last_oow_ack_time);
|
||||
}
|
||||
|
||||
/* RFC 5961 7 [ACK Throttling] */
|
||||
@@ -3463,9 +3468,9 @@ static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
|
||||
u32 count, now;
|
||||
|
||||
/* First check our per-socket dupack rate limit. */
|
||||
- if (tcp_oow_rate_limited(sock_net(sk), skb,
|
||||
- LINUX_MIB_TCPACKSKIPPEDCHALLENGE,
|
||||
- &tp->last_oow_ack_time))
|
||||
+ if (__tcp_oow_rate_limited(sock_net(sk),
|
||||
+ LINUX_MIB_TCPACKSKIPPEDCHALLENGE,
|
||||
+ &tp->last_oow_ack_time))
|
||||
return;
|
||||
|
||||
/* Then check host-wide RFC 5961 rate limit. */
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From 771209218b9ec051a573b9fddc149682a534190e Mon Sep 17 00:00:00 2001
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Sun, 10 Jul 2016 10:04:02 +0200
|
||||
Subject: [PATCH] tcp: make challenge acks less predictable
|
||||
|
||||
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.
|
||||
|
||||
Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2")
|
||||
Reported-by: Yue Cao <ycao009@ucr.edu>
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Yuchung Cheng <ycheng@google.com>
|
||||
Cc: Neal Cardwell <ncardwell@google.com>
|
||||
Acked-by: Neal Cardwell <ncardwell@google.com>
|
||||
Acked-by: Yuchung Cheng <ycheng@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/ipv4/tcp_input.c | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
|
||||
index c124c3c12f7c..8c011359646b 100644
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -87,7 +87,7 @@ int sysctl_tcp_adv_win_scale __read_mostly = 1;
|
||||
EXPORT_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;
|
||||
@@ -3460,7 +3460,7 @@ static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
|
||||
static u32 challenge_timestamp;
|
||||
static unsigned int challenge_count;
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
- u32 now;
|
||||
+ u32 count, now;
|
||||
|
||||
/* First check our per-socket dupack rate limit. */
|
||||
if (tcp_oow_rate_limited(sock_net(sk), skb,
|
||||
@@ -3468,14 +3468,19 @@ static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
|
||||
&tp->last_oow_ack_time))
|
||||
return;
|
||||
|
||||
- /* Then check the check host-wide RFC 5961 rate limit. */
|
||||
+ /* Then check host-wide RFC 5961 rate limit. */
|
||||
now = jiffies / HZ;
|
||||
if (now != challenge_timestamp) {
|
||||
+ u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;
|
||||
+
|
||||
challenge_timestamp = now;
|
||||
- challenge_count = 0;
|
||||
+ WRITE_ONCE(challenge_count, half +
|
||||
+ prandom_u32_max(sysctl_tcp_challenge_ack_limit));
|
||||
}
|
||||
- if (++challenge_count <= sysctl_tcp_challenge_ack_limit) {
|
||||
- NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPCHALLENGEACK);
|
||||
+ count = READ_ONCE(challenge_count);
|
||||
+ if (count > 0) {
|
||||
+ WRITE_ONCE(challenge_count, count - 1);
|
||||
+ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPCHALLENGEACK);
|
||||
tcp_send_ack(sk);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
Loading…
Reference in New Issue