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 2B5A93D47CE; Tue, 16 Jun 2026 18:13:50 +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=1781633632; cv=none; b=WvZsOSahykVATDGFkkv0N3ZybP8xMFDNliNFV7nzjEQUHPCsAq2Z+nYydxNqdCBmu15sEIZUzhjBvuskHlHo5XAVFcIOsx7HRjke+b4dRDvUVol2rCm6K6GYNEAXVOF1ArVzaCuYivyRaA5HDyL04y8K4Tg9NG+fccHQRGomvx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781633632; c=relaxed/simple; bh=C1EXbCOOk55A2dZioj3sCbLFOwAfR2TegGzB1BUMyIQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sv5Qkixdi4lmOzp+ILscAInFuYBAnPaaE0V9oSW77zILxUfeC11tuUaMUdVyxfYInymiCh53bk4Fm9kylmrXA04HbbnBR2qke3ZyyTDhxDy8As9dQ/2hjXQDEmsdQWFExHI5MHfPHPdkhUC2vsiLxy6k04x6pKqmPWrrwA1jhcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g9t+KI+K; 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="g9t+KI+K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAF961F000E9; Tue, 16 Jun 2026 18:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781633630; bh=NTx1Bkhn6hCuVyvUDRFQwxKRCSNUrEda5w2GTjCiPDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=g9t+KI+KP2+tSgGs6cl9ATnMk/bXqBaz6jVYWiG4NAG+GlaG9tlBx6catvNrEr/+f M3ZJAH5M9aZg4ON6cRf0Gl0uQeNsMJFcCRtfunHBi1A6aziYnOTU6C5Cx5gcmoaOZn /vniuHUCztS8SYhZn/VaFuivcFHyv7vWbY/5VM+g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable@kernel.org, Yuan Tan , Xin Liu , Luxing Yin , Zhengchuan Liang , Ren Wei , Justin Iurman , Ido Schimmel , Jakub Kicinski Subject: [PATCH 5.15 088/411] ipv6: exthdrs: refresh nh after handling HAO option Date: Tue, 16 Jun 2026 20:25:26 +0530 Message-ID: <20260616145104.921753031@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@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: Zhengchuan Liang commit f7b52afe3592eae66e160586b45a3f2242972c63 upstream. ip6_parse_tlv() caches skb_network_header(skb) in nh while walking IPv6 TLVs. ipv6_dest_hao() may call pskb_expand_head() for a cloned skb, which can move the skb head and invalidate the cached network header pointer. Refresh nh after ipv6_dest_hao() returns so any trailing padding or TLVs are parsed from the current skb head. This matches the existing pattern used in ip6_parse_tlv() after helpers that can modify skb header storage. Fixes: a831f5bbc89a ("[IPV6] MIP6: Add inbound interface of home address option.") Cc: stable@kernel.org Reported-by: Yuan Tan Reported-by: Xin Liu Co-developed-by: Luxing Yin Signed-off-by: Luxing Yin Signed-off-by: Zhengchuan Liang Signed-off-by: Ren Wei Reviewed-by: Justin Iurman Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/7aba1debc2196189172499e5769802b026f8caf8.1779247873.git.zcliangcn@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/exthdrs.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -202,6 +202,8 @@ static bool ip6_parse_tlv(bool hopbyhop, case IPV6_TLV_HAO: if (!ipv6_dest_hao(skb, off)) return false; + + nh = skb_network_header(skb); break; #endif default: