Skip to content

Commit

Permalink
Fix the adding of padding to COOKIE-ECHO chunks.
Browse files Browse the repository at this point in the history
Thanks to Mark Wodrich who found this issue while fuzz testing the
usrsctp stack and reported the issue in
sctplab/usrsctp#382

MFC after:		3 days
  • Loading branch information
tuexen committed Oct 5, 2019
1 parent ddf6ddc commit 353256a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sys/netinet/sctp_output.c
Expand Up @@ -9059,8 +9059,7 @@ sctp_send_cookie_echo(struct mbuf *m,
pad = 4 - pad;
}
if (pad > 0) {
cookie = sctp_pad_lastmbuf(cookie, pad, NULL);
if (cookie == NULL) {
if (sctp_pad_lastmbuf(cookie, pad, NULL) == NULL) {
return (-8);
}
}
Expand Down

0 comments on commit 353256a

Please sign in to comment.