From nobody Thu Aug 01 20:40:20 2024 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 4WZgnx1D7vz5RPqn; Thu, 01 Aug 2024 20:40:21 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgnx0N2zz4LPD; Thu, 1 Aug 2024 20:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544821; 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=EaNK8BfW8ETXIDIxaFuX8KqxBil9yBwLhKOJv10XUVo=; b=g3flY9uIDTvuOOe+YM1+IQo5nNnmVR0aDG41uyuK1JfbJEsEO6IJH2UGPzhcB9c/uOVs07 a7lpFKJo1lZoNUezlRI5F6vAcdhLTElhzkzPT9KKR6Olm9iYEr19PNCf5Ki5RkRydMdHPq lPrHq5beU8gF62uUROo0xsXZB1C0MLlb4dmQ7mafPJjgt6Tg0o7s3jGHZ/r8aR+L/tPVWB eX0q7+1oAwnl2f84xKTTljMEP9IxcQcXiiNMQqBedbtbSWbxNGhA0c25PcIc06uE/Kq6xu iBwOEsUrJN8xsgDllfih8uPRUH9iFut64tOtq5c0Joc/dnx79IBr9REMem8SeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722544821; a=rsa-sha256; cv=none; b=pKlaE0fc0LfDGNFRXdwskRJKxo1zyOPqIPfS4YRKYxzN/SffM0Buv+sQtK78TLtVd6kP69 ZwMTL+MvVODAzfyFEzOHiPxc/6ksPRIS91Gpox3TepVqBI51raUbtLnmB00eDf6zvPoWzd tBMnW3DEllZoZEeDO/3p7CgWF0bWiQtx1+sSy0T+phtmVcwUeKVdX5sum5GADVswwaG1cR oyFPz1KGFbmc7QaknLBCFykjL+Bo7DbwrfLjDS4tC/MOLNLiag8KOmyJJrh4EOIX0xxrDi i1hqJ/7fMsFmbBrVFU1TVJFsgneHXtieWb6PrSU6OX0V5yvQLmDFeVhYHR7p4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722544821; 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=EaNK8BfW8ETXIDIxaFuX8KqxBil9yBwLhKOJv10XUVo=; b=YYb9d9tNXyqz2BqFM9gRCXU0kWUaFwvz8RkhGeXFWnAvwkgA/umFnC2tu5afEKgYBHyhVf Iq6p19gZqtkXdUKbqY4qdjUmkLJ3fb3W0GhBCsNC3H4MT5SQ0qk/qAzNrtqC+A188Eycgv 8vm8hVx8k9jQrhY6uwSu12bOKHItHPGUpgtQliljzlQrezmnB9HDxAQzejxK7oeSVxCvyr K6JWk9B+CwL8XDDZP1OJScLijCxqODuWGc6vfl/Wy8kg6fWs4ZOVdBbq9aOX+vBXwDvZHP U3Zlet9QTvwDOWuBq0yttfYj7KCQofPGwwbcq+RkLKF2oPJ+wAt6oNJ/y1IfvQ== 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 4WZgnw74t5z102Z; Thu, 1 Aug 2024 20:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KeKx1047159; Thu, 1 Aug 2024 20:40:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KeKTW047156; Thu, 1 Aug 2024 20:40:20 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:40:20 GMT Message-Id: <202408012040.471KeKTW047156@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: f6599909ba6e - stable/13 - tcp rack: fix memory corruption 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: f6599909ba6ec846883e6142b909590b6dfdb6f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f6599909ba6ec846883e6142b909590b6dfdb6f9 commit f6599909ba6ec846883e6142b909590b6dfdb6f9 Author: Michael Tuexen AuthorDate: 2024-04-06 07:55:46 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:35:33 +0000 tcp rack: fix memory corruption When in rack_output() jumping to the label out, don't write errno into the log buffer, since the pointer is not initialized. Reported by: Coverity Scan CID: 1523773 Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44647 (cherry picked from commit d902c8f55b8da6902ab45e67ed756cc99f5a9d5a) --- sys/netinet/tcp_stacks/rack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 3e3900844989..7429dcac5d5b 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -18324,12 +18324,12 @@ send: mtu = inp->inp_route.ro_nh->nh_mtu; } #endif /* INET */ - -out: if (lgb) { lgb->tlb_errno = error; lgb = NULL; } + +out: /* * In transmit state, time the transmission and arrange for the * retransmit. In persist state, just set snd_max.