[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63d717ab-be9b-8b75-e4a0-7cac98facd14@iogearbox.net>
Date: Sat, 14 Nov 2020 01:46:04 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Jakub Kicinski <kuba@...nel.org>,
Yi-Hung Wei <yihung.wei@...il.com>,
Pablo Neira Ayuso <pablo@...filter.org>
Cc: davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
pieter.jansenvanvuuren@...ronome.com, netdev@...r.kernel.org,
alexei.starovoitov@...il.com
Subject: Re: [PATCH] ip_tunnels: Set tunnel option flag when tunnel metadata
is present
On 11/14/20 1:13 AM, Jakub Kicinski wrote:
> On Tue, 10 Nov 2020 16:16:40 -0800 Yi-Hung Wei wrote:
>> Currently, we may set the tunnel option flag when the size of metadata
>> is zero. For example, we set TUNNEL_GENEVE_OPT in the receive function
>> no matter the geneve option is present or not. As this may result in
>> issues on the tunnel flags consumers, this patch fixes the issue.
>>
>> Related discussion:
>> * https://lore.kernel.org/netdev/1604448694-19351-1-git-send-email-yihung.wei@gmail.com/T/#u
>>
>> Fixes: 256c87c17c53 ("net: check tunnel option type in tunnel flags")
>> Signed-off-by: Yi-Hung Wei <yihung.wei@...il.com>
>
> Seems fine to me, however BPF (and maybe Netfilter?) can set options
> passed by user without checking if they are 0 length.
>
> Daniel, Pablo, are you okay with this change or should we limit it to
> just fixing the GENEVE oddness?
Verifier will guarantee that buffer passed into helper is > 0, so seems
okay from BPF side.
Thanks,
Daniel
Powered by blists - more mailing lists