From: Jiri Pirko <jiri@resnulli.us>
To: Eldad Zack <eldad@fogrefinery.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net
Subject: Re: [patch net/stable] ipv6/exthdrs: accept tlv which includes only padding
Date: Sat, 7 Sep 2013 17:46:02 +0200 [thread overview]
Message-ID: <20130907154602.GA1442@minipsycho.orion> (raw)
In-Reply-To: <alpine.LNX.2.00.1309071427120.1262@heraclitus>
Sat, Sep 07, 2013 at 02:31:36PM CEST, eldad@fogrefinery.com wrote:
>
>Hi Jiri,
>
>On Fri, 6 Sep 2013, Jiri Pirko wrote:
>
>> In rfc4942 and rfc2460 I cannot find anything which would implicate to
>> drop packets which have only padding in tlv.
>
>NAK from my side.
>Please read RFC4942 2.1.9.5 "Misuse of Pad1 and PadN Options".
I did.
>
>While it doesn't specifically discusses this corner case, you can
>understand from "There is no legitimate reason for padding beyond the
>next eight octet..." that there's also no legitimate reason for an
>option header containing only padding.
Okay. I'm glad you agree with me and that we both understand the rfc the
same way. And since the rfc does not say that "here's no legitimate
reason for an option header containing only padding", this should be
possible. I say we respect rfc and do not add stronger restrictions than
it dictates. No need for them.
>I can't imagine a sane use-case for this.
rfcs are not about sanity...
>
>> Current behaviour breaks TAHI Test v6LC.1.2.6.
>
>I'm not familiar with this, but IMHO the test should be reversed :)
>
>Cheers,
>Eldad
>
>>
>> Problem was intruduced in:
>> 9b905fe6843 "ipv6/exthdrs: strict Pad1 and PadN check"
>>
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>> ---
>> net/ipv6/exthdrs.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
>> index 07a7d65..8d67900 100644
>> --- a/net/ipv6/exthdrs.c
>> +++ b/net/ipv6/exthdrs.c
>> @@ -162,12 +162,6 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs, struct sk_buff *skb)
>> off += optlen;
>> len -= optlen;
>> }
>> - /* This case will not be caught by above check since its padding
>> - * length is smaller than 7:
>> - * 1 byte NH + 1 byte Length + 6 bytes Padding
>> - */
>> - if ((padlen == 6) && ((off - skb_network_header_len(skb)) == 8))
>> - goto bad;
>>
>> if (len == 0)
>> return true;
>> --
>> 1.8.3.1
>>
next prev parent reply other threads:[~2013-09-07 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 14:02 [patch net/stable] ipv6/exthdrs: accept tlv which includes only padding Jiri Pirko
2013-09-07 12:31 ` Eldad Zack
2013-09-07 15:46 ` Jiri Pirko [this message]
2013-09-07 16:46 ` Eldad Zack
2013-09-07 21:34 ` Jiri Pirko
2013-09-07 22:03 ` Hannes Frederic Sowa
2013-09-08 1:50 ` David Miller
2013-09-08 4:20 ` YOSHIFUJI Hideaki
2013-09-11 19:53 ` David Miller
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=20130907154602.GA1442@minipsycho.orion \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=eldad@fogrefinery.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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.