From: Cong Wang <xiyou.wangcong@gmail.com>
To: Lin Ma <linma@zju.edu.cn>
Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
pablo@netfilter.org, kadlec@netfilter.org, jhs@mojatatu.com,
jiri@resnulli.us, lucien.xin@gmail.com,
pieter.jansenvanvuuren@netronome.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: fix geneve_opt length integer overflow
Date: Thu, 3 Apr 2025 15:10:51 -0700 [thread overview]
Message-ID: <Z+8Ha5m911k4H7ew@pop-os.localdomain> (raw)
In-Reply-To: <20250402165632.6958-1-linma@zju.edu.cn>
On Thu, Apr 03, 2025 at 12:56:32AM +0800, Lin Ma wrote:
> struct geneve_opt uses 5 bit length for each single option, which
> means every vary size option should be smaller than 128 bytes.
>
> However, all current related Netlink policies cannot promise this
> length condition and the attacker can exploit a exact 128-byte size
> option to *fake* a zero length option and confuse the parsing logic,
> further achieve heap out-of-bounds read.
>
...
> Fix these issues by enforing correct length condition in related
> policies.
>
> Fixes: 925d844696d9 ("netfilter: nft_tunnel: add support for geneve opts")
> Fixes: 4ece47787077 ("lwtunnel: add options setting and dumping for geneve")
> Fixes: 0ed5269f9e41 ("net/sched: add tunnel option support to act_tunnel_key")
> Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options")
> Signed-off-by: Lin Ma <linma@zju.edu.cn>
Maybe it is time to define a max option length in include/net/geneve.h,
but this is not a big deal. So:
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Thanks!
next prev parent reply other threads:[~2025-04-03 22:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 16:56 [PATCH net] net: fix geneve_opt length integer overflow Lin Ma
2025-04-02 21:37 ` Xin Long
2025-04-03 22:10 ` Cong Wang [this message]
2025-04-03 23:10 ` patchwork-bot+netdevbpf
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=Z+8Ha5m911k4H7ew@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linma@zju.edu.cn \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=pieter.jansenvanvuuren@netronome.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox