From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19B983B42CB; Tue, 21 Jul 2026 22:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784672051; cv=none; b=rPRgfMjpFE9EAYyN7oytDsRcPHEJUg5jhYPcCt7H4tiOUle7GU8JRT8Inahjd7mYcrhLPNvSs20K4bbHGvrlormU4AOlDn1Snn3d+Cwq8tNbyEmUK8AlJjjSwRF40nqP+d0pJaUHfJSNJnc2qJwXRa+g/hX46kWIX/w++5e4JpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784672051; c=relaxed/simple; bh=J3HQuRicY+ntSMTeV6opH/q4ZFex9b827DKwsUJD/UA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VCHwevyWCvrTlHaAN3bqrLz1bTstxo8hpISwy1wqetqsS32cKARQZ645/ZpphIlBU4/q+FBqPXBThxLxz4kTfv2NkN3aa1W6vWi95NGofZhMrYHQd8D5lu8ZVskyGt4X1+TlerAXPB5vHKPDs+YzVXJYftuGbxHUsnifIEIhQ4U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GpYbbP7G; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GpYbbP7G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D77E1F000E9; Tue, 21 Jul 2026 22:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784672050; bh=aQFrGGvv5lo1MHd9Rwher1QfVeS17ymGsD8XrVORH6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GpYbbP7Gf4fXwrkvqFhW/Kt6BDuOwTutQGRQckHd9unlpu35CNEEaxwfPuXUSg/sg XvtAmuf/tcSPMOwC4xLRWh0Pw+shqRc0jDfGdLHdVMfneNnTdcbiEbDiitm6UDNsQX vbllUAx0aJE22wAnlcP1zXGTbLFM/hjjX51+cEpE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolas Dichtel , Fernando Fernandez Mancera , Ido Schimmel , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 477/843] ipv6: fix error handling in ignore_routes_with_linkdown sysctl Date: Tue, 21 Jul 2026 17:21:52 +0200 Message-ID: <20260721152416.765555927@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152405.946368001@linuxfoundation.org> References: <20260721152405.946368001@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fernando Fernandez Mancera [ Upstream commit cf4f2b14401f29ccac56393ca9e4b42a2505f540 ] When writing to the ignore_routes_with_linkdown sysctl, if proc_dointvec() fails to parse the input, it returns a negative error code. The current implementation is overwriting that error for write operations. This results in a silent failure, it returns a successful write although the configuration was not modified at all. When modifying the "all" variant it can also modify the configuration of existing interfaces to the wrong value. Fix this by checking the return value of proc_dointvec() and returning early on failure. Fixes: 35103d11173b ("net: ipv6 sysctl option to ignore routes when nexthop link is down") Reviewed-by: Nicolas Dichtel Signed-off-by: Fernando Fernandez Mancera Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20260622130857.5115-3-fmancera@suse.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ipv6/addrconf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index cd491b118238a3..5f257a133b2ab7 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -6548,6 +6548,8 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl, lctl.data = &val; ret = proc_dointvec(&lctl, write, buffer, lenp, ppos); + if (ret) + return ret; if (write) ret = addrconf_fixup_linkdown(ctl, valp, val); -- 2.53.0