From nobody Tue Jul 19 19:23:30 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LnTJf4gzDz4WrBF; Tue, 19 Jul 2022 19:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LnTJf4BdDz4JwR; Tue, 19 Jul 2022 19:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658258610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIGjFy6XLosucjNSTGWXaJQe1unhCxOaLtuoBbZXJBU=; b=xmscZrkAe9SP/MFH6xdRibPgthvFl6Tl8Ui2viy5zd3tBlt33enc8Hee6B/XaHF6O1UXhz kG5CgZv2bNB+cjkdlcSeBH3GlE++kdZPLbSwYaIv1CVHBsQaFtZtfxlbtrNTOuBCj/uPfX xd+rRVfRVAIV1A3s9CPENUHrZ2+Zfb6a3+pa9PDnGAQL9DusDQfUuk0F25qcQRbPyG/Cti czSpFwmLACzwZcIKwxXgXWbxe7PeKXTqh8kmE5ATGqyleVUd3MVND+43CY4TEjrKSJ6Xnt 7ejYcq7E+mA5s51GL1MWByBp/UZ3LvWtPHxLVVMXVR2xyyzbVoybfRXZWw9MMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LnTJf3FXQzWK6; Tue, 19 Jul 2022 19:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26JJNUOe086330; Tue, 19 Jul 2022 19:23:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26JJNUSH086329; Tue, 19 Jul 2022 19:23:30 GMT (envelope-from git) Date: Tue, 19 Jul 2022 19:23:30 GMT Message-Id: <202207191923.26JJNUSH086329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 5b741298b11c - main - tcp rack: fix switching to RACK when FIN has been sent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b741298b11cdaec71877fa24b72764d1e697a33 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658258610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIGjFy6XLosucjNSTGWXaJQe1unhCxOaLtuoBbZXJBU=; b=Ci28rfERr0qf+JISJUxP2LC2WBwkSBcMrLmRgVf00a2KEve8bTzJ9MaPITi+NTs9b2e0PL ec+aDYhvFlzBpNzFw5PrTv3n3ilhAPCw7RVUjmS6hoUEe83zfgjq4ejeGqg0OS26/m0yIV odCKMeJrZi1g8wNIYjEmeSPfmgdkM+Ri1Kj+hQVz1w3Pq6/T+LeG5aoH+IZzCN39eHdO4A TGEFikRQixJFWbJ5uVS27MkG+MGwpAFo1cjUCzwUnOu36KieutuBNaK1fivkFMzghQfr9m xtXdyljYz4Moodq6DfpzikGBn4QL16jqfNy8R0wXeFdflLsDDe5kVsHZpcfRYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658258610; a=rsa-sha256; cv=none; b=J67DWUwhMo23siRxghCkg8x41QfSH4AqU3KdaN3p8+qM0n4NUntki4ktDrhrqKyVywV73T fX95fzRmiGgLVImUUbMl9Grsc9S2tHDTAkYaS9PR5vL6xp7ymVdtvvHnBAn4h4Ny1+B9r4 lPPsBfA9teQHtPwzjhx7zSc7LfLai0LP7IbLbXIQCln1+/bUVWwfdMd9SfVOLEDlYLXuhp qOWN+Tp9TLy0O0Yu9kUW1zItTQnHrpIJ/v5XgSeUG8y0kIOXxnc+9i0sE4nQEjJebiwDGu jylbtzdl4PJyrOpP+MVc+uFKZHsxYnr8dwCxxQAgzf7JA+1FacpBDgz2oZI+DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5b741298b11cdaec71877fa24b72764d1e697a33 commit 5b741298b11cdaec71877fa24b72764d1e697a33 Author: Michael Tuexen AuthorDate: 2022-07-19 18:28:25 +0000 Commit: Michael Tuexen CommitDate: 2022-07-19 18:28:25 +0000 tcp rack: fix switching to RACK when FIN has been sent Fix the rack sendmap entry in case a FIN has been sent when the stack is switched over to RACK. Reported by: syzbot+dd55e316428419e9354b@syzkaller.appspotmail.com Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D35731 --- sys/netinet/tcp_stacks/rack.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index ff43fbd02de2..ce33f507bc1c 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12608,12 +12608,9 @@ rack_init(struct tcpcb *tp) rsm->r_tim_lastsent[0] = rack_to_usec_ts(&rack->r_ctl.act_rcv_time); rsm->r_rtr_cnt = 1; rsm->r_rtr_bytes = 0; - if (tp->t_flags & TF_SENTFIN) { - rsm->r_end = tp->snd_max - 1; + if (tp->t_flags & TF_SENTFIN) rsm->r_flags |= RACK_HAS_FIN; - } else { - rsm->r_end = tp->snd_max; - } + rsm->r_end = tp->snd_max; if (tp->snd_una == tp->iss) { /* The data space is one beyond snd_una */ rsm->r_flags |= RACK_HAS_SYN;