]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ipv6: exthdrs: refresh nh pointer after ipv6_hop_jumbo()
authorJustin Iurman <justin.iurman@gmail.com>
Fri, 22 May 2026 11:20:13 +0000 (13:20 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 May 2026 18:08:00 +0000 (11:08 -0700)
ipv6_hop_jumbo() calls pskb_trim_rcsum(), which can change skb pointers.
Let's recompute nh pointer to make sure any change won't mess things up.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Justin Iurman <justin.iurman@gmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260522112013.12342-1-justin.iurman@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/exthdrs.c

index 6d92c02d0e3dc4d81b20b21b61cfcb93046cea1c..aca2a2abd2dfced10e4bea3d073db56ca55dec39 100644 (file)
@@ -184,6 +184,8 @@ static bool ip6_parse_tlv(bool hopbyhop,
                                case IPV6_TLV_JUMBO:
                                        if (!ipv6_hop_jumbo(skb, off))
                                                return false;
+
+                                       nh = skb_network_header(skb);
                                        break;
                                case IPV6_TLV_CALIPSO:
                                        if (!ipv6_hop_calipso(skb, off))