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 2D8A7444719; Mon, 17 Aug 2026 14:36:49 +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=1786977410; cv=none; b=qz/w8YrlMJYfhuEr54cHxpMmbnwmJ6n3lP9v2A6tnvndePmDuv01poyYJwi15gmFXA9ziERJ1/Kzn24T07i5bl2A49yxzLyMAXkGWUMKdCBKt47Z5t6VLzcfCK4bvSv8brcVB87bgfzyiafC0aZn+5te0guYxrL0/w/YDH2sE+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786977410; c=relaxed/simple; bh=miqpY5if3TVaeaszdcHJASTHxJkHujbmAa4k2TRY3LE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FSQU6rzQjz1dXK60kcAzx87F7DlGmppeD53l8HOGsirnViHmnKHuSd7fpgTrjRoyma8FAIIwYrI2ohK6G1AIWBPc4a2BzFHzG+mC6o3GgPr/AyNEJfwOzEIB5XHWtKk5oM82kFHUhRrKWn5lQhHyZDSVBwdV89X2rSO3f/gXVto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dazAzP3I; 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="dazAzP3I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83E201F000E9; Mon, 17 Aug 2026 14:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786977409; bh=xf/KUYv/pltMddYyWm1t7B2KJSUL5wtNnnjsw/Fikmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dazAzP3InKOUXeX1xlSfBiCqFXSUtfJIw/DuLWCk8VIqhrMDZXuQ0pzdBIpMPJA0S 66ABs7O4PTVsuCQkvVM0xJEbYVZCRX863oAL+Qimu/ZGHlNBx3ku88N4vlP5DgmhzH u53WQ09VQh0VXDiZY/edx+r9vPriqZ1IPp8D3MgE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vega , Zhiling Zou , Ren Wei , Ido Schimmel , Jakub Kicinski Subject: [PATCH 5.15 320/456] net: ipv6: clear suppressed fib6 rule result Date: Mon, 17 Aug 2026 15:31:50 +0200 Message-ID: <20260817132552.214281642@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132539.792407575@linuxfoundation.org> References: <20260817132539.792407575@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: Zhiling Zou commit 6aea62e433fe1b586202a5fee8b5807ce635e1d7 upstream. fib6_rule_suppress() drops a suppressed route with ip6_rt_put_flags(), but leaves res->rt6 pointing at the released rt6_info. If no later rule supplies a replacement, fib6_rule_lookup() still sees res.rt6 and returns that stale dst to its caller. A suppressing rule can therefore leak a released route back to rt6_lookup(), and the next put hits rcuref_put_slowpath() from dst_release(). Clear res->rt6 when suppressing the route so suppressed lookups fall through to the null dst instead of reusing the released one. Fixes: cdef485217d3 ("ipv6: fix memory leak in fib6_rule_suppress") Cc: stable@vger.kernel.org Reported-by: Vega Signed-off-by: Zhiling Zou Signed-off-by: Ren Wei Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/4b8acb7787d54e440155585dd32ebdf0bef7d122.1784710966.git.zhilinz@nebusec.ai Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/fib6_rules.c | 1 + 1 file changed, 1 insertion(+) --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -300,6 +300,7 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_s suppress_route: ip6_rt_put_flags(rt, flags); + res->rt6 = NULL; return true; }