ipgre_header() pushes the outer IPv4 header and t->hlen bytes of GRE header, but fills in only the IPv4 header and the base GRE header. When the tunnel sends a checksum, a key or a sequence number, those fields keep whatever was in the skb's headroom, and a packet socket bound to the device copies them to user space. Clear the whole header before filling it in. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Suggested-by: Ido Schimmel Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Kyuwon Cho --- net/ipv4/ip_gre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 5485586fa0e6..84dde2e16f18 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -907,6 +907,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, return -needed; iph = skb_push(skb, needed); + memset(iph, 0, needed); greh = (struct gre_base_hdr *)(iph+1); greh->flags = gre_tnl_flags_to_gre_flags(t->parms.o_flags); greh->protocol = htons(type); -- 2.43.0