From: Ido Schimmel <idosch@nvidia.com>
To: Yingjie Wang <1075151112@qq.com>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, alexhenrie24@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3] ipv6: reject wrapped temporary address preferred lifetimes
Date: Fri, 30 Oct 2026 15:43:42 +0200 [thread overview]
Message-ID: <20261030134342.GA36226@shredder> (raw)
In-Reply-To: <tencent_7A270291DDE5CD89DAFFE8A745D094D5BD06@qq.com>
On Fri, Oct 30, 2026 at 03:30:56PM +0800, Yingjie Wang wrote:
> ipv6_create_tempaddr() raises a temporary address's preferred lifetime to
> regen_advance + age + 1 when the configured lifetime is too short. The
> result is stored in a u32, while regen_advance and age are unsigned long.
> If the sum wraps or is truncated, the stored lifetime can still be less
> than or equal to regen_advance + age.
>
> addrconf_verify_rtnl() then sees the new address as due for regeneration
> and creates another one. Temporary addresses are not limited by
> max_addresses since commit 4b08a8f1bd8c ("ipv6: remove max_addresses
> check from ipv6_create_tempaddr"), so this can cause unbounded address
> growth. With dad_transmits set to -1, a baseline kernel reached 2859
> loopback addresses in two seconds.
>
> After storing the adjusted lifetime, verify that it is still greater than
> regen_advance + age. Reject the new address if the check fails.
>
> On an x86-64 KASAN kernel, the normal configuration created three IPv6
> addresses. The negative dad_transmits, positive multiplication overflow,
> and large retransmission-time cases each left only the loopback and public
> addresses. An i386 defconfig and an x86-64 allmodconfig both built
> addrconf.o with W=1.
>
> Fixes: f4bcbf360ac8 ("net: ipv6/addrconf: clamp preferred_lft to the minimum required")
> Cc: stable@vger.kernel.org
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Link: https://lore.kernel.org/netdev/20261029175827.GA1411453@shredder/
> Signed-off-by: Yingjie Wang <1075151112@qq.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
next prev parent reply other threads:[~2026-10-30 13:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 8:22 [PATCH net] ipv6: bound temporary address regeneration advance Yingjie Wang
2026-10-27 23:23 ` netdev-bot+sashiko
2026-10-29 12:09 ` Paolo Abeni
2026-10-29 15:26 ` [PATCH net v2] " Yingjie Wang
2026-10-29 15:28 ` netdev-bot+sinfo
2026-10-29 17:58 ` Ido Schimmel
2026-10-30 7:30 ` [PATCH net v3] ipv6: reject wrapped temporary address preferred lifetimes Yingjie Wang
2026-10-30 7:33 ` netdev-bot+sinfo
2026-10-30 13:43 ` Ido Schimmel [this message]
2026-10-31 17:22 ` Alex Henrie
2026-10-31 11:44 ` Xia Yan
2026-10-31 18:36 ` Yingjie Wang
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=20261030134342.GA36226@shredder \
--to=idosch@nvidia.com \
--cc=1075151112@qq.com \
--cc=alexhenrie24@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@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