From nobody Tue Jun 07 18:46:48 2022 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 EF834837362; Tue, 7 Jun 2022 18:46:48 +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 4LHfTh5tvXz3MDr; Tue, 7 Jun 2022 18:46:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654627608; 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=AjHswEyNi/pdSr3mJPuao6+SDdyiedvjgedoo2YoAns=; b=N3sxFCHakA4qyaeHqtXI6JKDR6SwEhtPCDOQi8ZVfJoptyT7VHIVYsLtcS1ODcbH9FkzJT 9MqqVhPGt/P04tiNn0AI/N47lZJMIYTe5PkKVsesuJvZB1K6+MZ86grtbPbSdFJv8zZTgR GdnvGW8wW24/4rvSgv6H39y3W/w7HPsR5Z2EOO1WtoUKEUhEtL2Pkwt0oMD+qO0lb3iaOB lmJTWnrc6XB2E/3nBLx7Y2Q0keapfjP1euml/ZDdey/un/yAC6zHdo81Gwk2CMpJKraou0 BMiei8Zj1SdTAmTtvOdQdi0LyfsIZHnpQwoR/u4ZUnkaklHqTaXIrcQw9uqiCQ== 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 AA10220751; Tue, 7 Jun 2022 18:46:48 +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 257Ikm5c073622; Tue, 7 Jun 2022 18:46:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 257Ikmfu073621; Tue, 7 Jun 2022 18:46:48 GMT (envelope-from git) Date: Tue, 7 Jun 2022 18:46:48 GMT Message-Id: <202206071846.257Ikmfu073621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 231e0dd5d1fb - main - tcp: skip sackhole checks on NULL 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 231e0dd5d1fb7778b1cb285e5ebee5502d5ad253 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654627608; 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=AjHswEyNi/pdSr3mJPuao6+SDdyiedvjgedoo2YoAns=; b=MWxivBMeoSjMlbBnym992V8uq2YnyYUQiqib0YY6c1FaR3oEMj9WfXDUrGJBEfNXFbXhNS c/W0KGko2kCBhzxHoVU7s+QC+B78kbV7FROd0h4wp6QX4X+9TqHjURADZv7wjWicMRmSvI 8wCi2jHNWt7TBeIJ1z51+0by+n8tcI5IslwQh1hSgqxN4SOd0i36gDgODOPQOkK5SeQnMG LgCdDJqWglRw53IjgVfRztZXJG3cTqYF62qhsfjpuCxWLDBF73eZCqB5kJZw7i50AqSbEB JSgBUKyEf2tLfuYADgPOMbGvcSkd6L7BtIcZViXNi+ckvwpaFkDy19L/Cxhn3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654627608; a=rsa-sha256; cv=none; b=GyJqULoT/rFgt2fO9f+HB+bum9Far1LQ9p6vti/emkLafvii906xW8tuX9MVjYtFPMnM3f lDs1lVMbEogzBu20eY3K/Jyx2m1kmeWQfWLMdidfZLdKrWAQeZAmeSuc9e3JwZCufVmBKB I8v7KpdingfnIYJE5CI+FWdZy91xVWAltZyUIAjp8lyr4ijyy0vKHBsqIUazGqib7QWHdv ehsAa3PSKDSLVy0mLY5lRktwwjQxbgmi2M477zjtKgk1kWJ9ePXUzLnW9bIPRz21sq1LL5 wQA9ibpLDTcMhVMDJRWmqWw2vZXzI/U5cxAMrCgw7yF8pchEkaO2saFP3Mpz9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=231e0dd5d1fb7778b1cb285e5ebee5502d5ad253 commit 231e0dd5d1fb7778b1cb285e5ebee5502d5ad253 Author: Richard Scheffenegger AuthorDate: 2022-06-07 16:16:54 +0000 Commit: Richard Scheffenegger CommitDate: 2022-06-07 16:18:42 +0000 tcp: skip sackhole checks on NULL Inadvertedly introduced NULL pointer dereference during sackhole sanity check in D35387. Reviewed By: glebius PR: 263445 MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D35423 --- sys/netinet/tcp_sack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index c1bbf65a0770..273d56c510e2 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -956,7 +956,9 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) INP_WLOCK_ASSERT(tp->t_inpcb); *sack_bytes_rexmt = tp->sackhint.sack_bytes_rexmit; hole = tp->sackhint.nexthole; - if (hole == NULL || SEQ_LT(hole->rxmit, hole->end)) + if (hole == NULL) + return (hole); + if (SEQ_LT(hole->rxmit, hole->end)) goto out; while ((hole = TAILQ_NEXT(hole, scblink)) != NULL) { if (SEQ_LT(hole->rxmit, hole->end)) {