Skip to content

Commit

Permalink
SCTP: Fix chunk acceptance when no authenticated chunks were listed.
Browse files Browse the repository at this point in the history
In the case where no autheticated chunks were specified, we were still
trying to verify that a given chunk needs authentication and doing so
incorrectly.  Add a check for parameter length to make sure we don't
try to use an empty auth_chunks parameter to verify against.

Signed-off-by: Vlad Yasevich <[email protected]>
  • Loading branch information
Vlad Yasevich committed Nov 29, 2007
1 parent 8ee4be3 commit 555d3d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sctp/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param)
int found = 0;
int i;

if (!param)
if (!param || param->param_hdr.length == 0)
return 0;

len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t);
Expand Down

0 comments on commit 555d3d5

Please sign in to comment.