From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: Question regarding handling of ootb packets
Date: Tue, 19 Jan 2010 03:23:51 +0000 [thread overview]
Message-ID: <4B5525C7.1080007@cn.fujitsu.com> (raw)
In-Reply-To: <20100119024254.GA2161@localhost.localdomain>
Neil Horman wrote:
> Hey all-
> I'm having a bit of trouble understanding the implementation of
> sctp_rcv_ootb. Specifically I'm wondering why we allow packets checked in
> sctp_rcv_ootb with malformed chunks into the receive queue. For instance, if a
> chunk in an ootb packet has a zero length, we break out of the loop and return
> 0, which lets us eventually call sctp_inq_push to put it on the receive queue,
> from which point on we seem to assume the chunk header length field is valid and
> correct. Am I missing something, or is this a bug?
>
>
Before we put it to the receive queue, we had confirmed that
this chunk has a lendth at least sizeof(struct sctp_chunkhdr).
int sctp_rcv(struct sk_buff *skb)
{
...
/* Make sure we at least have chunk headers worth of data left. */
if (skb->len < sizeof(struct sctp_chunkhdr))
goto discard_it;
...
}
We let this chunk go into process by sctp_inq_push() is because
do this we can then send a ABORT to tell the sender the packet
is malformed. the chunk header length check will be done later,
sush as in sctp_sf_ootb().
>
next prev parent reply other threads:[~2010-01-19 3:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 2:42 Question regarding handling of ootb packets Neil Horman
2010-01-19 3:23 ` Wei Yongjun [this message]
2010-01-22 12:01 ` Neil Horman
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=4B5525C7.1080007@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=linux-sctp@vger.kernel.org \
/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.