git: 5678f3b366c2 - stable/14 - sctp: don't provide uninitialized memory to process_chunk_drop()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Aug 2024 22:24:05 UTC
The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5678f3b366c28c6828d32bd758fda4d6b965aebf commit 5678f3b366c28c6828d32bd758fda4d6b965aebf Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-08 22:17:13 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> 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); }