From: AnishMulay <anishm7030@gmail.com>
To: idosch@nvidia.com
Cc: pimyn@google.com, dsahern@kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+ded267b328e950a7c0c4@syzkaller.appspotmail.com
Subject: Re: [PATCH] ipv6: addrconf: drop "BUG: " prefix from pr_warn()
Date: Sun, 27 Sep 2026 13:51:34 -0400 [thread overview]
Message-ID: <20260927175134.1909-1-anishm7030@gmail.com> (raw)
In-Reply-To: <20260909115655.GA1344764@shredder>
On Wed, Sep 09, 2026 at 02:56:55PM +0300, Ido Schimmel wrote:
> Does your reproducer rely on both keep_addr_on_down being set on the
> loopback device and its MTU going below 1280?
>
> The loopback device retains global addresses when this happens, unlike
> any other device [...]
>
> So, given that this state is quite broken and unlikely to be used by
> anyone other than fuzzers, I would like to simply align the loopback
> behavior with other devices and avoid keeping its addresses when the MTU
> goes below the minimum:
>
> [...]
> - if (!unregister && !idev->cnf.disable_ipv6) {
> + if (!unregister && !idev->cnf.disable_ipv6 &&
> + dev->mtu >= IPV6_MIN_MTU) {
>
> Regenerating the route in this case is more complexity for a case that
> nobody is hitting other than fuzzers.
No, mine does not touch MTU at all. dev->mtu stays above 1280 the whole
time. My trigger is a second addrconf_ifdown() racing the pending
addrconf_dad_work from an earlier up, both inside a single "ip link set
lo up" call (that fires both NETDEV_UP and NETDEV_CHANGE through
addrconf_notify()). The route gets deleted, the notifier gets skipped,
and the async work later runs with ifp->rt NULL.
I checked this against the source rather than assuming it: your MTU
check sits in the NETDEV_CHANGEMTU branch of addrconf_notify(), and my
reproducer never crosses that branch. So I think these are two separate
entry points into the same broken state (kept address, no route,
notifier skipped), not one bug with two descriptions of it.
Your fix looks right to me and I would support it landing as is: it
closes the MTU triggered path cleanly by gating keep_addr_on_down on
dev->mtu >= IPV6_MIN_MTU in addrconf_ifdown(). It would not close mine
though, since my race never brings dev->mtu below the minimum.
I still have a patch that regenerates the route reactively, at the
point the DAD completion work discovers ifp->rt is NULL, tested against
both my reproducer and the general shape of this race rather than just
the MTU case. I think it is worth sending regardless of whether yours
lands first, as a backstop for any other path into this state, but you
know this code far better than I do, so it is your call on order. Happy
to send mine as a follow up once yours lands, rebase mine on top of
yours, or hold off entirely if you would rather keep this scoped to
just your fix for now. Whatever is easiest for you to review.
Thanks for digging into the MTU case, the unregister argument asymmetry
in addrconf_ifdown() is what made the loopback only behavior click for
me.
Anish
next prev parent reply other threads:[~2026-09-27 17:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 13:13 Pimyn Girgis
2026-08-10 9:51 ` Ido Schimmel
2026-08-10 8:54 ` Pimyn Girgis
2026-08-10 10:40 ` Ido Schimmel
2026-09-08 4:31 ` AnishMulay
2026-09-09 11:56 ` Ido Schimmel
2026-09-27 17:51 ` AnishMulay [this message]
2026-09-28 16:35 ` Ido Schimmel
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=20260927175134.1909-1-anishm7030@gmail.com \
--to=anishm7030@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pimyn@google.com \
--cc=syzbot+ded267b328e950a7c0c4@syzkaller.appspotmail.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®