From: Liping Zhang <zlpnobody@gmail.com>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nf_conntrack_sip: CSeq 0 is a valid CSeq
Date: Mon, 4 Jul 2016 19:43:45 +0800 [thread overview]
Message-ID: <CAML_gOeiqhdtV7Q0X8PWCoj1VDsTcWUhsCYcmLhdTigoaY=3tQ@mail.gmail.com> (raw)
In-Reply-To: <bb18da60-bd09-05e0-0244-49942abbd1bd@c-s.fr>
2016-07-04 14:14 GMT+08:00 Christophe Leroy <christophe.leroy@c-s.fr>:
>> I think there is no need to convert simple_strtoul to kstrtouint, add
>> a further check seems better?
>> Like this:
>> - if (!cseq) {
>> + if (!cseq && *(*dptr + matchoff) != '0') {
>>
>
> And what about an invalid CSeq that would look like CSeq: 0abzk852 ?
> Should we check it is 0 + space instead ?
In this case, i.e. some stupid sip clients set CSeq to "0abzk852",
your patch will also fail to detect this "error".
Because for "Cseq", int (*match_len)(...) point to digits_len(see
struct sip_header ct_sip_hdrs definition).
So in this case match_len will just be setted to ONE (not
sizeof("0abzk852")-1), then cseq will be parsed
as 0 by kstrtouint, not as an error.
next prev parent reply other threads:[~2016-07-04 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 9:48 [PATCH] netfilter: nf_conntrack_sip: CSeq 0 is a valid CSeq Christophe Leroy
2016-07-04 5:48 ` Liping Zhang
2016-07-04 6:14 ` Christophe Leroy
2016-07-04 11:43 ` Liping Zhang [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-01 9:45 chleroy
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='CAML_gOeiqhdtV7Q0X8PWCoj1VDsTcWUhsCYcmLhdTigoaY=3tQ@mail.gmail.com' \
--to=zlpnobody@gmail.com \
--cc=christophe.leroy@c-s.fr \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.