From: Shan Wei <shanwei@cn.fujitsu.com>
To: Nicolas Kaiser <nikai@nikai.net>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>,
Sridhar Samudrala <sri@us.ibm.com>,
linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sctp: remove redundant chunk length check
Date: Thu, 21 Oct 2010 12:06:55 +0000 [thread overview]
Message-ID: <4CC02CDF.5040700@cn.fujitsu.com> (raw)
In-Reply-To: <20101021121409.6de7d429@absol.kitzblitz>
Nicolas Kaiser wrote, at 10/21/2010 06:14 PM:
> Checking the chunk length at this point appears redundant, as
> the rest of the packet gets discarded anyway.
>
> Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Yes, indeed.
How did you find this? By reviewing the source code?
--
Best Regards
-----
Shan Wei
> ---
> net/sctp/sm_statefuns.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 4b4eb7c..9840615 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3418,12 +3418,6 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
>
> SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
>
> - /* If the chunk length is invalid, we don't want to process
> - * the reset of the packet.
> - */
> - if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
> - return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
> -
> /* We need to discard the rest of the packet to prevent
> * potential bomming attacks from additional bundled chunks.
> * This is documented in SCTP Threats ID.
WARNING: multiple messages have this Message-ID (diff)
From: Shan Wei <shanwei@cn.fujitsu.com>
To: Nicolas Kaiser <nikai@nikai.net>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>,
Sridhar Samudrala <sri@us.ibm.com>,
linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sctp: remove redundant chunk length check
Date: Thu, 21 Oct 2010 20:06:55 +0800 [thread overview]
Message-ID: <4CC02CDF.5040700@cn.fujitsu.com> (raw)
In-Reply-To: <20101021121409.6de7d429@absol.kitzblitz>
Nicolas Kaiser wrote, at 10/21/2010 06:14 PM:
> Checking the chunk length at this point appears redundant, as
> the rest of the packet gets discarded anyway.
>
> Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Yes, indeed.
How did you find this? By reviewing the source code?
--
Best Regards
-----
Shan Wei
> ---
> net/sctp/sm_statefuns.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 4b4eb7c..9840615 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3418,12 +3418,6 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
>
> SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
>
> - /* If the chunk length is invalid, we don't want to process
> - * the reset of the packet.
> - */
> - if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
> - return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
> -
> /* We need to discard the rest of the packet to prevent
> * potential bomming attacks from additional bundled chunks.
> * This is documented in SCTP Threats ID.
next prev parent reply other threads:[~2010-10-21 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 10:14 [PATCH] sctp: remove redundant chunk length check Nicolas Kaiser
2010-10-21 10:14 ` Nicolas Kaiser
2010-10-21 12:06 ` Shan Wei [this message]
2010-10-21 12:06 ` Shan Wei
2010-10-21 13:08 ` Nicolas Kaiser
2010-10-21 13:08 ` Nicolas Kaiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CC02CDF.5040700@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=nikai@nikai.net \
--cc=sri@us.ibm.com \
--cc=vladislav.yasevich@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.