提交 a5108878 编写于 作者: A Arnaldo Carvalho de Melo 提交者: David S. Miller

GSO: Reload iph after pskb_may_pull

As it may get stale and lead to use after free.
Acked-by: NEric 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: NArnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 725cbb62
......@@ -1233,7 +1233,7 @@ struct sk_buff *inet_gso_segment(struct sk_buff *skb,
fixedid = !!(skb_shinfo(skb)->gso_type & SKB_GSO_TCP_FIXEDID);
/* 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册