Thread (2 messages) 2 messages, 2 authors, 2022-03-03
STALE1607d

[PATCH] net/sctp: use memset avoid infoleaks

From: <hidden>
Date: 2022-03-01 08:19:09
Also in: linux-sctp, lkml
Subsystem: networking [general], sctp protocol, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Marcelo Ricardo Leitner, Xin Long, Linus Torvalds

From: Minghao Chi (CGEL ZTE) <redacted>

Use memset to initialize structs to preventing infoleaks
in sctp_auth_chunk_verify

Reported-by: Zeal Robot <redacted>
Signed-off-by: Minghao Chi (CGEL ZTE) <redacted>
---
 net/sctp/sm_statefuns.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index cc544a97c4af..7ff16d12e0c5 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -652,6 +652,7 @@ static bool sctp_auth_chunk_verify(struct net *net, struct sctp_chunk *chunk,
 		return false;
 
 	/* set-up our fake chunk so that we can process it */
+	memset(&auth, 0x0, sizeof(auth));
 	auth.skb = chunk->auth_chunk;
 	auth.asoc = chunk->asoc;
 	auth.sctp_hdr = chunk->sctp_hdr;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help