From nobody Wed Feb 01 23:30:41 2023 X-Original-To: dev-commits-src-all@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 4P6dSx5y8rz3cLGj; Wed, 1 Feb 2023 23:30:41 +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 4P6dSx5S2Vz3KTF; Wed, 1 Feb 2023 23:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294241; 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=u8oOFzga5jsYNzL37Mhp3xpCSu4lBuRiKMh7sBE9/3w=; b=FjRHhygT5gT7ZwEIP6pyPLGaDLE38JQj/DXvCnBW/2QYkiWtZ7zZt8BtJyQ8Zfg8h1MnZY g4bqZf4LasoWlC0GqRGlqmRb9Ae60dHxrbfFcghM8RZUT4oFwJyUpOqwy2NAhnqLa3xTri rNtjvvxoGOxDIZwYW0eGlwJzL1vmnc0GqJNM4JFeTKUSkRavPE65jm81WQux4Lcow5OeP3 1NuEEr2t+76glmHSp7fK6FrTkx4z3tbFDuED7r3vayZTtcHHv1SAGD56su82qN+9FjA+A9 32GFVFWa3zDuAGgbCqhwwsMYdIYAUxnRBJijVfNZib90ADS4i7f+aJ7wXajdTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675294241; 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=u8oOFzga5jsYNzL37Mhp3xpCSu4lBuRiKMh7sBE9/3w=; b=YdDaokvyz6f0MNRNTLhAnOl6HrLjiUJ+7WLFhsghm/7VrpVwAqoNDCbMFqrCofjGVgKWrs MS3oTcmTcrOX47xLt5Uwl9iGi7eqcU/VNTkG7ZUL4svq+KgesNYj2XDL4+lHcNDMnUwq78 uQEwEukL7v01VVDgZ6zIog70VWytq4JgZPnY8zJLco0Y8fqvuQ/jtz9nxtE9/+JfLC7uVx 3hN7KAhuEzhfjw88G7gto/0+Qxqll/vyPmqiWqSWki0KUc9kfIjp+P/OpUwDp33aZV9MBM fuzHkyRugEXiUMiqcxJfCRpDdWOpvzaiBbX+Y7cfIMedOthQBnJSl/i3Erh/tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675294241; a=rsa-sha256; cv=none; b=vzdOIMZrU9md52ni285f7Tfz6q/tDrpgK/umGUpTMNFnk4wLJMCM7GPkHCW4kSlJezJlrD p2g//5QkNPxALhS8AETEnlWOUI+I4LghsqE7YnGHGAwqM+mJ1TDH5g5zX1zIjCsK30H8C2 Tf4KKeFa8W0DWwNID1HbqEFxL1fZmsWjGzs9ROmh0V0nZNfFs+X2FHUsFzTBbkTEVh5sis KGe8kAA09UKxCY1IfM/2xi5Tjdlz1pbpgyN6rKX3PSc0M6GlA6WGFqDZmDzpaZ1fWib2E3 h4dY13qiZKCCnYqEpzR3LkAS0PsYTEkldc9RGialGf192BxMLpfuL0Kk+7EvZg== 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 4P6dSx4W8LzY6t; Wed, 1 Feb 2023 23:30:41 +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 311NUfYv070778; Wed, 1 Feb 2023 23:30:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311NUfgL070776; Wed, 1 Feb 2023 23:30:41 GMT (envelope-from git) Date: Wed, 1 Feb 2023 23:30:41 GMT Message-Id: <202302012330.311NUfgL070776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 36d33812f387 - stable/13 - tcp rack: fix switching to RACK when FIN has been sent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 36d33812f387f1dbc3b9e7b15fd94004bb81fb4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=36d33812f387f1dbc3b9e7b15fd94004bb81fb4e commit 36d33812f387f1dbc3b9e7b15fd94004bb81fb4e Author: Michael Tuexen AuthorDate: 2022-07-19 18:28:25 +0000 Commit: Michael Tuexen CommitDate: 2023-02-01 23:30:03 +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 Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D35731 (cherry picked from commit 5b741298b11cdaec71877fa24b72764d1e697a33) --- 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 1cf89388399c..e11351e5c515 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12283,12 +12283,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;