git: 83dcc7790b11 - main - sctp: don't provide uninitialized memory to process_chunk_drop()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 May 2024 15:23:41 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=83dcc7790b11e605c32ec9a091c6bba3bc921083
commit 83dcc7790b11e605c32ec9a091c6bba3bc921083
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-05-08 22:17:13 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-05-08 22:17:13 +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
MFC after: 3 days
---
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);
}