From: Cheng Yongkang <teel4res@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [BUG] net: ipvlan: failed newlink leaves shared port state changed
Date: Thu, 22 Oct 2026 02:17:04 -0700 [thread overview]
Message-ID: <20261022091704.3652547-1-teel4res@gmail.com> (raw)
Hi all,
Two failure paths in creation of a new ipvlan slave mutate shared
ipvl_port state even though the requested device is not created.
1. ipvlan_link_new() publishes the new mode/flags and existing slaves'
IFF_NOARP/L3S state. A later do_set_master() failure deletes only
the new device. The existing slave keeps the port alive, so none of
the shared changes are rolled back.
2. If L3S hook registration fails inside ipvlan_set_port_mode(), the
per-slave IFF_NOARP change is reverted, but the newly written shared
port->flags value is not.
Observed on Linux v7.3, commit
08ab31164c55f20c7a2653de3186ae333470e2c1.
For the first path, an RTM_NEWLINK requesting L3S+VEPA with a nonexistent
IFLA_MASTER returned -EINVAL and no second link was created. The
pre-existing slave nevertheless changed from:
mode=L2 flags=0 noarp=0
to:
mode=L3S flags=VEPA noarp=1
For the second path, fault injection in nf_hook_entries_grow() made hook
registration return -ENOMEM. The failed request left the existing
slave's shared port at mode=L2 flags=VEPA while correctly restoring
IFF_NOARP.
The newlink operation should be transactional: defer shared-port
publication until all generic netlink steps can no longer fail, or
restore the full previous mode, flags, NOARP, hook, and l3mdev state if
the outer path deletes the new device.
The 2026-10-01 ipvlan review thread notices the narrower flags-ordering
problem, but does not cover the later do_set_master() failure or the
complete L3S/mode rollback.
Candidate BR-011 and BR-012 reproduce the two distinct failure sizes;
they are presented as one transactional-state bug here.
The PoCs, failslab runner, and logs are available on request.
This was found with a multi-agent workflow; both state
transitions were reproduced under QEMU.
Thanks,
Cheng Yongkang
reply other threads:[~2026-10-22 9:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261022091704.3652547-1-teel4res@gmail.com \
--to=teel4res@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--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®