Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5108878 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

GSO: Reload iph after pskb_may_pull



As it may get stale and lead to use after free.

Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Cc: Alexander Duyck <aduyck@mirantis.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Fixes: cbc53e08 ("GSO: Add GSO type for fixed IPv4 ID")
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 725cbb62
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1233,7 +1233,7 @@ struct sk_buff *inet_gso_segment(struct sk_buff *skb,
		fixedid = !!(skb_shinfo(skb)->gso_type & SKB_GSO_TCP_FIXEDID);
		fixedid = !!(skb_shinfo(skb)->gso_type & SKB_GSO_TCP_FIXEDID);


		/* fixed ID is invalid if DF bit is not set */
		/* fixed ID is invalid if DF bit is not set */
		if (fixedid && !(iph->frag_off & htons(IP_DF)))
		if (fixedid && !(ip_hdr(skb)->frag_off & htons(IP_DF)))
			goto out;
			goto out;
	}
	}