summaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-06-29 11:19:44 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-01 11:16:38 -0700
commita34dcbfa1475f18a8f1b1dc3dedb76d746874e61 (patch)
tree57d73abcc051f39b98e755f86b31ea89b4c52ddf /net/sctp
parent996af62167d0e0ec69b938a3561e96f84ffff1aa (diff)
downloadlwn-a34dcbfa1475f18a8f1b1dc3dedb76d746874e61.tar.gz
lwn-a34dcbfa1475f18a8f1b1dc3dedb76d746874e61.zip
sctp: prevent info leak in sctp_make_heartbeat()
The "hbinfo" struct has a 4 byte hole at the end so we have to zero it out to prevent stack information from being disclosed. Fixes: fe59379b9ab7 ("sctp: do the basic send and recv for PLPMTUD probe") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_make_chunk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 6c08e5048d38..b8fa8f1a7277 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1163,7 +1163,7 @@ struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *asoc,
const struct sctp_transport *transport,
__u32 probe_size)
{
- struct sctp_sender_hb_info hbinfo;
+ struct sctp_sender_hb_info hbinfo = {};
struct sctp_chunk *retval;
retval = sctp_make_control(asoc, SCTP_CID_HEARTBEAT, 0,