Skip to content

Commit

Permalink
MFC r353119:
Browse files Browse the repository at this point in the history
Fix the adding of padding to COOKIE-ECHO chunks.

Thanks to Mark Wodrich who found this issue while fuzz testing the
usrsctp stack and reported the issue in
sctplab/usrsctp#382
  • Loading branch information
tuexen committed Oct 10, 2019
1 parent de9faac commit 4bcd405
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 4bcd405

Please sign in to comment.