From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EC49F3BFE49; Thu, 15 Jan 2026 18:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768500064; cv=none; b=jadDoSiprKgv4A7YGdb4DGspt7nMSbTXprOCazawkRnArPKQ2TDGwviD3MDwSENaNl8OSBUKO7Pwo1+9QCTAWfzFOLkyByoUIFvydpe3wl/zbpiCtoUKD+JvRMcmcKgjzN0+bP9emOc3yxuuOWuETuumP0yMVcktPa75X0LWfng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768500064; c=relaxed/simple; bh=3Xj+AfzfX3PWYUmUJnnrBG/9LDaTqM7A/by5OnUBQOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bf0P/D54xnUBZNyEbiCEJCW3W1yC4C/INIYt0u62iw5GoxTfmfaxprSgv5NOcktbqEVuLiqPdWalgzqjOf69211v4a7CWcaQhZmagxLglzPuXqSVolqhnRX8Q2ruHoVN4I05vJlzpUGCzvW1yEbCOjCy62cZqtfUDQBCJweWc6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hREn9R/d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hREn9R/d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3216CC116D0; Thu, 15 Jan 2026 18:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768500063; bh=3Xj+AfzfX3PWYUmUJnnrBG/9LDaTqM7A/by5OnUBQOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hREn9R/drenCaIxmKUSInqYCrZq/r+MDZfMvKEyY6wrzq+6CNg0qAk8UQN8PGIDZm nroUX9Fq2EiqZNP9c8UxTwnZ+qwKsesyACJgXP8chiLl3HzuKTCQGicmzxGWQ+W3oj OK0XyfT+bQUMTXomcQBlg0u6e5ExPil+kT08xmFo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+58b44a770a1585795351@syzkaller.appspotmail.com, Eric Dumazet , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 444/451] arp: do not assume dev_hard_header() does not change skb->head Date: Thu, 15 Jan 2026 17:50:45 +0100 Message-ID: <20260115164247.008085103@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164230.864985076@linuxfoundation.org> References: <20260115164230.864985076@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit c92510f5e3f82ba11c95991824a41e59a9c5ed81 ] arp_create() is the only dev_hard_header() caller making assumption about skb->head being unchanged. A recent commit broke this assumption. Initialize @arp pointer after dev_hard_header() call. Fixes: db5b4e39c4e6 ("ip6_gre: make ip6gre_header() robust") Reported-by: syzbot+58b44a770a1585795351@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20260107212250.384552-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ipv4/arp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 6879e0b70c769..5f2788b87dfd5 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -542,7 +542,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, skb_reserve(skb, hlen); skb_reset_network_header(skb); - arp = skb_put(skb, arp_hdr_len(dev)); + skb_put(skb, arp_hdr_len(dev)); skb->dev = dev; skb->protocol = htons(ETH_P_ARP); if (!src_hw) @@ -550,12 +550,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, if (!dest_hw) dest_hw = dev->broadcast; - /* - * Fill the device header for the ARP frame + /* Fill the device header for the ARP frame. + * Note: skb->head can be changed. */ if (dev_hard_header(skb, dev, ptype, dest_hw, src_hw, skb->len) < 0) goto out; + arp = arp_hdr(skb); /* * Fill out the arp protocol part. * -- 2.51.0