Skip to contentSkip to conversation

Patch "tcp: fix wraparound issue in tcp_lp" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message May 11, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

tcp: fix wraparound issue in tcp_lp

to the 4.4-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-fix-wraparound-issue-in-tcp_lp.patch
and it can be found in the queue-4.4 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 foo@baz Thu May 11 12:38:23 CEST 2017

From: Eric Dumazet <[email protected]>
Date: Mon, 1 May 2017 15:29:48 -0700
Subject: tcp: fix wraparound issue in tcp_lp

From: Eric Dumazet <[email protected]>

[ Upstream commit a9f11f963a546fea9144f6a6d1a307e814a387e7 ]

Be careful when comparing tcp_time_stamp to some u32 quantity, otherwise result can be surprising.

Fixes 7c106d7e782b ("[TCP]: TCP Low Priority congestion control")
---
 net/ipv4/tcp_lp.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
net/ipv4/tcp_lp.c +4 -2
@@ -264,13 +264,15 @@ static void tcp_lp_pkts_acked(struct soc
 {
 	struct tcp_sock *tp = tcp_sk(sk);
 	struct lp *lp = inet_csk_ca(sk);
+	u32 delta;
 
 	if (rtt_us > 0)
 		tcp_lp_rtt_sample(sk, rtt_us);
 
 	/* calc inference */
-	if (tcp_time_stamp > tp->rx_opt.rcv_tsecr)
-		lp->inference = 3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr);
+	delta = tcp_time_stamp - tp->rx_opt.rcv_tsecr;
+	if ((s32)delta > 0)
+		lp->inference = 3 * delta;
 
 	/* test if within inference */
 	if (lp->last_drop && (tcp_time_stamp - lp->last_drop < lp->inference))

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/tcp-do-not-underestimate-skb-truesize-in-tcp_trim_head.patch queue-4.4/tcp-fix-wraparound-issue-in-tcp_lp.patch queue-4.4/tcp-do-not-inherit-fastopen_req-from-parent.patch