diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2008-02-05 06:02:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-05 06:02:26 -0500 |
commit | d2f19fa13ee5e78d4195a771f8f1ff7d42a80740 (patch) | |
tree | 1faad0851f729cb8bf45b976cf3b28c5de9a2164 /net/sctp/sm_statefuns.c | |
parent | b9c4d82a853713d49ac53b507964d7cf30ee408d (diff) |
[SCTP]: Fix kernel panic while received AUTH chunk while enabled auth
If STCP is started while /proc/sys/net/sctp/auth_enable is set 0 and
association is established between endpoints. Then if
/proc/sys/net/sctp/auth_enable is set 1, a received AUTH chunk will
cause kernel panic.
Test as following:
step 1: echo 0> /proc/sys/net/sctp/auth_enable
step 2:
SCTP client SCTP server
INIT --------->
<--------- INIT-ACK
COOKIE-ECHO --------->
<--------- COOKIE-ACK
step 3:
echo 1> /proc/sys/net/sctp/auth_enable
step 4:
SCTP client SCTP server
AUTH -----------> Kernel Panic
This patch fix this probleam to treat AUTH chunk as unknow chunk if peer
has initialized with no auth capable.
> Sorry for the delay. Was on vacation without net access.
>
> Wei Yongjun wrote:
>>
>>
>> This patch fix this probleam to treat AUTH chunk as unknow chunk if
>> peer has initialized with no auth capable.
>>
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>
> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
>
>>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5df0c4bd415b..f98658782d4f 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -3865,6 +3865,10 @@ sctp_disposition_t sctp_sf_eat_auth(const struct sctp_endpoint *ep, | |||
3865 | struct sctp_chunk *err_chunk; | 3865 | struct sctp_chunk *err_chunk; |
3866 | sctp_ierror_t error; | 3866 | sctp_ierror_t error; |
3867 | 3867 | ||
3868 | /* Make sure that the peer has AUTH capable */ | ||
3869 | if (!asoc->peer.auth_capable) | ||
3870 | return sctp_sf_unk_chunk(ep, asoc, type, arg, commands); | ||
3871 | |||
3868 | if (!sctp_vtag_verify(chunk, asoc)) { | 3872 | if (!sctp_vtag_verify(chunk, asoc)) { |
3869 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, | 3873 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, |
3870 | SCTP_NULL()); | 3874 | SCTP_NULL()); |