From nobody Sat Aug 03 22:24:05 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 4Wby0j2q0Xz5RRg6; Sat, 03 Aug 2024 22:24:05 +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 4Wby0j2BWCz4FWL; Sat, 3 Aug 2024 22:24:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722723845; 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=R5ntVjPeD+F/kkFuYXn/WjDSWJF7ijyDwPPLiozVvxI=; b=kxUEXwePDeYbQSxAGkM4QGJUgLqLW9RawcvAChF0cahRbalWpfFLnFxAtDZTi79KrZe+/a MEKr5ajhAhQYNCGp157ILBxFWnLfwaQcH8pPB4u6gxUJ5fe/1qI7UApSh/KLHqljpLpC84 3uka4faxdf9ka2qLDQtyQ4JjiUPSrmWBT2YuJw0jKgpHUAjfJ+lnZRHBCL+5OT/McG3EG2 3HQfcoOXWITgd4J9uKva1n124jmGQjK5NYctcwusgqtm8dV170xaXgdgvBh+LgOqIxSXsH 25YJe00AbvJMYVunY4eF/lXG846F++J9dyfHP5ixE6nIHmkH5xWdX1avamCfQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722723845; a=rsa-sha256; cv=none; b=LU9O/PWuilDPMbVHk7z+wbSFt77rsmKy2ahKiynrtejKHFon0OjeAB+0W+EbB5MFZqEE2D +sqOyTvSFyiMdF2T/4xa1yLMA2GIifj/V1xHSspILY60CcholJt1bFWMIhKiN0V7yXD0g3 WYtLVX8+WUsFH6Pz8wqwyEOlX68n7w2x3Z0HSYDanyZJO7UKpzZhrVr8Yde/Gj7WCSlzhs WSZUpCp/f/ptuFUzv++l1nLE+hO5MKNdQVvU6iEht0F5COfbomLf04PwJg6VCYhIrlTbWH KVIST6wI8bbHGZwKoO/m2Jtqq4KSuHWyYyjb4680mE2XXYd4xM8sTh+z+IZvMg== 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=1722723845; 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=R5ntVjPeD+F/kkFuYXn/WjDSWJF7ijyDwPPLiozVvxI=; b=wyzYT0KQXkoBDbxYCZEzHCobbiAnMxl2SzlP70oVPMNX6zAXgXZ7FR+hqfUPy6fJeWehX5 8Cy+rOU1mmmGx+H43tinrIkeqgeOmUifCTWnmTy5CinEz+s3nkHN1qAPDc9Fa/EsTrRLAn MUiOP+urcvsbzfvnED0P6aiYX/fyrr/3mtCzTiDBLAaYWf87+7KBSC1TenRSXTtBpB65dH eED1rDyDnr3RTo+20T2jOdu1FX3uoOFx/p49qRVowh8mp/HvUsFQnRbmuwbRo7GHSpTg/i X9y01Jvc1f9msbM/Ikg4yfJyfD7kWbOe1eT+tKH1F67Ro3Uz4o7/xm+EwtQ9qQ== 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 4Wby0j1pDFzV88; Sat, 3 Aug 2024 22:24:05 +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 473MO5rJ025729; Sat, 3 Aug 2024 22:24:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MO5VB025726; Sat, 3 Aug 2024 22:24:05 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:24:05 GMT Message-Id: <202408032224.473MO5VB025726@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: 5678f3b366c2 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 5678f3b366c28c6828d32bd758fda4d6b965aebf Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5678f3b366c28c6828d32bd758fda4d6b965aebf commit 5678f3b366c28c6828d32bd758fda4d6b965aebf Author: Michael Tuexen AuthorDate: 2024-05-08 22:17:13 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:23:37 +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 a55ef5ac1eab..0a8372a07362 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4231,6 +4231,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); }