Skip to content

Commit

Permalink
MFC r353119: Fix padding of COOKIE_ECHO chunks
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


git-svn-id: https://svn.freebsd.org/base/stable/11@360742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
  • Loading branch information
tuexen committed May 7, 2020
1 parent 0b65c44 commit b1ebdf2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sys/netinet/sctp_output.c
Expand Up @@ -9053,8 +9053,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 b1ebdf2

Please sign in to comment.