NetBSD Problem Report #53778

From www@NetBSD.org  Tue Dec 11 16:16:05 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B8C137A18A
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Dec 2018 16:16:05 +0000 (UTC)
Message-Id: <20181211161604.B2E667A1E3@mollari.NetBSD.org>
Date: Tue, 11 Dec 2018 16:16:04 +0000 (UTC)
From: siyuz@bostondynamics.com
Reply-To: siyuz@bostondynamics.com
To: gnats-bugs@NetBSD.org
Subject: snd_wl1 & snd_wl2 not updated in TCP fast path
X-Send-Pr-Version: www-1.0

>Number:         53778
>Category:       kern
>Synopsis:       snd_wl1 & snd_wl2 not updated in TCP fast path
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 11 16:20:00 +0000 2018
>Originator:     Steven Zhang
>Release:        
>Organization:
Boston Dynamics
>Environment:
N/A
>Description:
In tcp_input.c, the TCP fast path does not update snd_wl1 and snd_wl2. If the stream stays on the fast path long enough for th_ack or th_seq to wrap, the sequence number check in "step6" will fail and ignore future window updates.

Since the window size is automatically reduced by the amount of data acked when not on the fast path (tcp_input.c:2589), this can cause send window to close and not reopen.

This problem was discovered in a different OS that had a TCP stack based on NetBSD, but appears to be present in NetBSD as well.

>How-To-Repeat:
Transmit enough data to cause th_ack to wrap. Have the receiver start sending window updates. Eventually the sending window will close and will not reopen.
>Fix:
This bug was fixed in FreeBSD in 2002:

https://github.com/freebsd/freebsd/commit/b6176d93b1df287a5a9776b3de562aef877b931c

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.