From: Aaron Conole <aconole@redhat.com>
To: Kyuwon Cho <kyuwoncho18@gmail.com>
Cc: Eelco Chaudron <echaudro@redhat.com>,
Ilya Maximets <i.maximets@ovn.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, dev@openvswitch.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] net: openvswitch: WARN_ONCE in ovs_fragment() reachable with a user-supplied MRU on a non-IP packet
Date: Wed, 18 Nov 2026 12:39:19 -0500 [thread overview]
Message-ID: <f7to6bmjayg.fsf@aconole-thinkpadt14gen4.rmtusnh.csb> (raw)
In-Reply-To: <179492834266.3639154.14679778183890331729@gmail.com> (Kyuwon Cho's message of "Tue, 17 Nov 2026 07:12:32 -0800 (PST)")
Hi,
Kyuwon Cho <kyuwoncho18@gmail.com> writes:
> Hi Aaron, Eelco, Ilya,
>
> While testing v7.4-rc3 with an LLM-guided test generator that we are
> developing as a research prototype, we found that OVS_PACKET_CMD_EXECUTE
> can trigger the WARN_ONCE() at the end of ovs_fragment(). An unprivileged
> user can do this from its own user and network namespace:
>
> Failed fragment ->ovs0: eth=8847, MRU=500, MTU=1500.
> WARNING: net/openvswitch/actions.c:831 at ovs_fragment+0x239/0x840, CPU#1: test/106
> CPU: 1 UID: 65534 PID: 106 Comm: test Not tainted 7.4.0-rc3 #1 PREEMPT(lazy)
> RIP: 0010:ovs_fragment+0x24e/0x840
> Call Trace:
> <TASK>
> do_execute_actions+0x580e/0x7380
> ovs_execute_actions+0xd3/0x3e0
> ovs_packet_cmd_execute+0xc21/0x13c0
> genl_family_rcv_msg_doit+0x1e0/0x2c0
> genl_rcv_msg+0x42d/0x6f0
> netlink_rcv_skb+0x11f/0x350
> genl_rcv+0x23/0x30
> netlink_unicast+0x518/0x870
> netlink_sendmsg+0x849/0xe20
> __sys_sendto+0x36a/0x3c0
>
> OVS_PACKET_ATTR_MRU is taken from the request as is. In do_output(), a
> packet longer than mru + hard_header_len goes to ovs_fragment() when mru
> is not larger than the port's MTU. ovs_fragment() only handles IPv4 and
> IPv6, and treats any other ethertype as a case that should not happen:
>
> } else {
> WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
> ovs_vport_name(vport), ntohs(key->eth.type), mru,
> vport->dev->mtu);
> reason = OVS_DROP_FRAG_INVALID_PROTO;
> goto err;
> }
>
> With an MRU in the request, any ethertype reaches it; we used MPLS
> (0x8847). The packet is dropped either way, so the effect is the
> warning, which panics a machine with panic_on_warn.
>
> Dropping the packet with a rate-limited message instead of the WARN, as
> fd954cc1919e ("openvswitch: switch from WARN to pr_warn") did for
> ovs_dp_reset_user_features(), or checking the ethertype in do_output()
> before calling ovs_fragment(), should avoid it. We have not tested either
> change.
>
> The reproducer runs as an unprivileged user (uid 65534) that creates a
> user and network namespace, creates a datapath with an internal port,
> and executes one 1434-byte Ethernet frame with ethertype 0x8847,
> OVS_PACKET_ATTR_MRU 500 and an output action to that port. On an x86_64
> QEMU guest with 2 vCPUs and KASAN (gcc 13.3, config attached), it warns
> in every run (7 of 7).
>
> Checked against v7.4-rc3 (aebb72744764); actions.c is the same in
> net-next (6ff4c5942a30). We found no earlier report on syzbot or in a
> web search.
>
> The reproducer (repro.c) and the kernel config are attached.
We can change it, and I think it makes sense. A ratelimited warn seems
appropriate.
Did the LLM already generate a patch for the issue? That would helpful.
> Thanks,
> Kyuwon Cho
next prev parent reply other threads:[~2026-11-18 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 15:12 Kyuwon Cho
2026-11-18 17:39 ` Aaron Conole [this message]
2026-11-18 18:06 ` [PATCH net] net: openvswitch: don't WARN on a non-IP packet that needs fragmenting Kyuwon Cho
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=f7to6bmjayg.fsf@aconole-thinkpadt14gen4.rmtusnh.csb \
--to=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=kyuwoncho18@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®