From nobody Thu Aug 01 20:59:28 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 4WZhD05bGvz5RRjx; Thu, 01 Aug 2024 20:59:28 +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 4WZhD055hMz4PM7; Thu, 1 Aug 2024 20:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722545968; 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=b1cT5MBtnUs1dxYvpz1nxY6w7qZqZf5APKg4EtKt+rg=; b=DjigQnTR+mFpqVAXCuOArzz9uQyGEou68F5rE8six81MckjAmGARvcGzrIiwi31Y24n0t3 op6/7pQNd+teQxAK8lXo1XKhYbpGGySqiX4cki2TCkrCIX7JyNIdURic0IZTrFPOx/oqmw wD5IUVTv1GbiIq36SpybBKxCVabd1TLUix2R/DnipYnvoWquU/ZliJs6AdJm7J7fdWMCqr TKyi6vSDvUNkGoq0aJx4h4rMYev0lwsSNkDdNmKpWsL3eGfRA7jPFA6RIZxB0hDEtRG0Sv knAfXYlmjILPJdPpByyyC0l6Aw81qz/G4mU3esv4XJqtrbAL3hKra+pCHg9oaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722545968; a=rsa-sha256; cv=none; b=bkGDEbRdTTtoRJqibs389FPte07+Cy20QYgAX7vtDN2VJYGfUsmwaRG/aLhE/Y0bbmBLL3 68zYNwZ2Ob5v2daZq6XOrHYiETBIMF9yQUrGB+7ckJ8u7OY2iaGXuOStXuirJSLajc3DXo +AA93KMs+hlNEW+K8je2wFBnWVQqpv/f6Lc60fUqkpYgHE92kdtp4uXK7GtE4ezhN0+/tJ AnY1ITynPGwPFN5Ftx+gW/S/B9E5mYM3XmQx0pmkDuFRamqFrA3B/6vsnNYHRnR97+iNak InoBXI9rg6PkTny9vXUF5GhTqP7syfJfZOpkMrmRdIkpLzNsoNxxz1mf+X6MXQ== 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=1722545968; 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=b1cT5MBtnUs1dxYvpz1nxY6w7qZqZf5APKg4EtKt+rg=; b=m2WJXuFKr08bJh7wvXqvtPRdtNrrzFEKjHgKA0PwNvbRv+nBouEGbQTj3pCLGbnzBJ0OYZ /PUjOIj8ZAgaWSOiP8LwleQiGUXbs25KlkpvKhK+UU1ZA51OvvVB96BUD2/GJmU6YGNgx1 UqypFZBvf0z2XmsE7ndJTDIpnCFp2LglHJTW7aXsPQV7vEtsGX3nIG8nFsBXIw79DrFfFV jDYtb+tHYrS1t+zIKitKAOM54VytTG76yjz2EvRY5GVRBVTSS+KsvhauMisG+VY3J6GAi/ vmBy2cU1WEIeTisYodA0ynJ+Q8k5V+FPbemInrijfaKNIqRYVjVSij6k9w/YTw== 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 4WZhD04f2Pz10jY; Thu, 1 Aug 2024 20:59:28 +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 471KxS1L072870; Thu, 1 Aug 2024 20:59:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KxSKP072867; Thu, 1 Aug 2024 20:59:28 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:59:28 GMT Message-Id: <202408012059.471KxSKP072867@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: 1de31f53f9e4 - stable/13 - sctp: don't provide uninitialized memory to process_chunk_drop() 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: 1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 commit 1de31f53f9e4f3fd9e3cf72f2cfc7d62d17bf1e7 Author: Michael Tuexen AuthorDate: 2024-05-08 22:17:13 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:58:51 +0000 sctp: don't provide uninitialized memory to process_chunk_drop() Right now, the code in process_chunk_drop() does not look the the corresponding fields. Therefore, no functional change intended. Reported by: Coverity Scan CID: 1472476 (cherry picked from commit 83dcc7790b11e605c32ec9a091c6bba3bc921083) --- sys/netinet/sctp_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 7ad9eec07897..b6239b0d9ad6 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4229,6 +4229,8 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, SCTP_STAT_INCR(sctps_pdrpmbda); } } else { + desc.tsn_ifany = htonl(0); + memset(desc.data_bytes, 0, SCTP_NUM_DB_TO_VERIFY); if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbct); }