mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
sctp: fix to check the source address of COOKIE-ECHO chunk
SCTP does not check whether the source address of COOKIE-ECHO chunk is the original address of INIT chunk or part of the any address parameters saved in COOKIE in CLOSED state. So even if the COOKIE-ECHO chunk is from any address but with correct COOKIE, the COOKIE-ECHO chunk still be accepted. If the COOKIE is not from a valid address, the assoc should not be established. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
85c5ed4e44
commit
de6becdc08
4 changed files with 28 additions and 17 deletions
|
@ -595,8 +595,7 @@ static int sctp_cmd_process_init(sctp_cmd_seq_t *commands,
|
|||
* fail during INIT processing (due to malloc problems),
|
||||
* just return the error and stop processing the stack.
|
||||
*/
|
||||
if (!sctp_process_init(asoc, chunk->chunk_hdr->type,
|
||||
sctp_source(chunk), peer_init, gfp))
|
||||
if (!sctp_process_init(asoc, chunk, sctp_source(chunk), peer_init, gfp))
|
||||
error = -ENOMEM;
|
||||
else
|
||||
error = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue