Article View: linux.kernel.netdev
Article #9129Re: [PATCH net v3] ipv6: reject wrapped temporary address preferred lifetimes
From: Xia Yan
Date: Sat, 31 Oct 2026 11:44
Date: Sat, 31 Oct 2026 11:44
33 lines
10244 bytes
10244 bytes
Hi, One question on the clamp added by f4bcbf360ac8, separate from the wrap fixed here - I don't think this patch needs to address it. I have only followed the source and have not run this case. As far as I can tell the clamp's termination relies on cfg.valid_lft and if_public_preferred_lft being finite. Consider a public address with both lifetimes at INFINITY_LIFETIME and a large regen_advance, with no wrap involved. For example with regen_min_advance=2, regen_max_retry=3, dad_transmits=1, an RA Retrans Timer around 28,600,000 ms and HZ=1000, regen_advance is around 85802; raising regen_max_retry via sysctl has the same effect. If temp_prefered_lft is set below regen_advance, the effective max_desync_factor goes negative, desync_factor is reset to 0, and the clamp engages on every creation. The clamped preferred lifetime regen_advance + age + 1 then passes all three checks, including the new one. But the temporary address inherits the public address's tstamp, so addrconf_verify_rtnl() finds it due for regeneration one second after each creation: one new temporary address per second, each living about temp_valid_lft. Creation is only refused once age grows enough that regen_advance + age + 1 exceeds cfg.valid_lft, which here is just temp_valid_lft, so the accumulation is bounded, but with the numbers above it can still reach tens of thousands of addresses. Is this finite-lifetime assumption part of the intended behavior of the clamp, or would it be worth tightening separately? Thanks, Xia
Technical Details
Message-ID:
<179344707641.114606.12665582704521593779@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354075-linux-kernel-netdev=dewy.ruReferences:
<tencent_C2E4FE9B7C0A05615861782611715EAA9C0A@qq.com> <tencent_7A270291DDE5CD89DAFFE8A745D094D5BD06@qq.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354075-linux-kernel-netdev=dewy.ru From: yanxia@cmss.chinamobile.com (Xia Yan) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v3] ipv6: reject wrapped temporary address preferred lifetimes Date: Sat, 31 Oct 2026 19:44:36 +0800 Organization: Usenet Network Message-ID: <179344707641.114606.12665582704521593779@cmss.chinamobile.com> References: <tencent_C2E4FE9B7C0A05615861782611715EAA9C0A@qq.com> <tencent_7A270291DDE5CD89DAFFE8A745D094D5BD06@qq.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2446734"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:eupDJ38/HXfP8fFPskx6DqovozE= sha256:U33gGvoj8X1Nuc38ua5Dj9ozLEAMZDjuROo/RkdqasE= sha1:hK1tii3do8Dz7hpmYiAGO1AlFA8= sha256:PMsBKzzxAPOAxu2lbEcVfyVpeMtE5olXRrIc+KN7m3E= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 083D7125CB8; Sat, 31 Oct 2026 14:45:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.75 X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SW86ajkna3qs; Sat, 31 Oct 2026 14:45:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-354075-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id F1C1C125CB7; Sat, 31 Oct 2026 14:45:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 56F702734D; Sat, 31 Oct 2026 11:44:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793447096; b=SjOnSSjWHvnpy3VaE4L3bexLg4IHoNzCe6qlLB2soJWcTpK2W2lejxLzMjdKH+ocTFes UXfQaWygkUQ3axvBz83D6Oc6hYIwSmY5ic9uc5YGrvJKTcqT1C9zS5sCQmWZewPosMCNi U7bxub/HgtkUvbsXYWwsvsjlaiqTno5xNjZWP15Y8LSPa/ocQm6q2tlA28apLdAvwR5EU +bLygFXoMWFcczRlpgQvJ6BRdTl5aTY18/C5ZJRVYGWM72yRRj/o76oS53EtcfTalIK9D /aXdTM53lq4muL0+04bwjJen88JRuktfiXWr33cmAJNdYMoXwNFHxIfeEk8i6H3BHbg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793447096; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version; bh=CVHGbPYBXbnlGmadd7sg4ULsHDVkzLKJ1bNCGoljV8I=; b=Jh9Y/rTT9g+K1UcSFcodGje0L7lNx39KQVhcrxs0vogBUsyb9zBgVcrsMBkO8apmyjQu NCkxzVQEMf6C2h0IeQkgTwn1JObnW8/rczvcgYP6CvxZbZXLHyskiqU0qZXQWLDzfg29Y meQ2KTiCbYCKGZ0rcxHFUwY8WI7NFdj/RzPKrGABCgWM4wOhOjy+OJ+KI/auegDpczTqH Dx97waf9YApKJm/WH4I4c1Oiq4JrczHKc2hvkU3gZkADDbmAxviEvEig2/WjeFWCQNvfl Lujy7td9zimYX/dvvU2bV+W21MVW0NXVPe1FypzjRZkjdCQB5JuQNEonU4RAwJxtivw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=xbyOkOlu; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D56FD606A322; Sat, 31 Oct 2026 11:44:56 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=xbyOkOlu X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.135 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793447090; b=0Avh/TVmBvHOImTyNN0uVi1GUDWKYdVWYdVepjEKacl/BCE+n3TcwQaipc45kc8AUgJM +rCVg0dDKsC7n+e7MVXEfz9aBv1FAeOvQ82SUChxKfYdQftLgm+0Ipai3DGuMsam6UxFd 0ln4+jzwtN0AI0VWghM6jKZ/09ur7zqeEuYtGkV8sSh+DSZ2MhQ9Kbz+dY38+WYGPmdg0 tEMuly2ldHxn/RIHLj1z1v6VHTul7jdNyZA7Gce2vJKIPSjOGvnzWPYUjZGdJXv1SGs50 jS36h8sTnc/S4NFX420AWtSwluWFXP6OC3Ey/qxMSf25nk6aLbbd8PDHM8SVgZwm/rw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793447090; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=CVHGbPYBXbnlGmadd7sg4ULsHDVkzLKJ1bNCGoljV8I=; b=WDaLaKQXkqp0m12Byi1XW4/vjTGYsHYzQnbCq/59XghBWR/X3rnz6ShhQhXQrcOkLoJW 9hjdSXf1vCjmp5asV7EnWfWb+2KwPjMHI/W6ERTDX3bwxkqGIyH1+s/P04vmHDa1wzNLk nwxSq1E5bvlIJ48653iZG0jrEDfLbe7byy+VclLd4zoazC3c93oNqkjW5xDQQmP8M7YVD xKkzRMMgcxX7Wbm4MNA9KVyJaACo2g76SUosYebtY7qtPGUDXmwpbHBTdlTJfyvlES507 eS1oLxqUgdnOilE9HmIyrxmOhBdarAw+ikD240/JT+kOUfthc4/JZ6pxw/gDNGspY8g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=xbyOkOlu; arc=none smtp.remote-ip=111.22.67.135 X-Received: from cmccmta2.chinamobile.com (cmccmta2.chinamobile.com [111.22.67.135]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4073606A31A; Sat, 31 Oct 2026 11:44:47 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A4073606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=xbyOkOluZiPxoxtnXmeMntgSXkhHxsiL+Q9xChsHip2tg8YB3dPxFZ2wxTPTxoJTKOIr3DuZlEbj1 V2oTC/Xby5YWJPG20AIRSOIxvHN7KaTxRws/CmaXgdSkzxHlvJCBiXm0jLwjnHZf21P4XdmkdnF3zF tcIAWGxE0KESy99g= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app07-12007 (RichMail) with SMTP id 2ee76ae5d49b899-7ba42; Sat, 31 Oct 2026 19:44:38 +0800 (CST) X-RM-TRANSID: 2ee76ae5d49b899-7ba42 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from [198.18.0.33] (unknown[222.93.19.82]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee76ae5d4a4b6b-82117; Sat, 31 Oct 2026 19:44:38 +0800 (CST) X-RM-TRANSID: 2ee76ae5d4a4b6b-82117 X-Cc: netdev@vger.kernel.org, dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, alexhenrie24@gmail.com, linux-kernel@vger.kernel.org, yana06070@163.com X-In-Reply-To: <tencent_7A270291DDE5CD89DAFFE8A745D094D5BD06@qq.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list