net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb
stable inclusion from stable-5.10.37 commit 71ad9260c001b217d704cda88ecea251b2d367da bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit d13f048d ] Modify the header size check in geneve6_xmit_skb and geneve_xmit_skb to use pskb_inet_may_pull rather than pskb_network_may_pull. This fixes two kernel selftest failures introduced by the commit introducing the checks: IPv4 over geneve6: PMTU exceptions IPv4 over geneve6: PMTU exceptions - nexthop objects It does this by correctly accounting for the fact that IPv4 packets may transit over geneve IPv6 tunnels (and vice versa), and still fixes the uninit-value bug fixed by the original commit. Reported-by: Nkernel test robot <oliver.sang@intel.com> Fixes: 6628ddfe ("net: geneve: check skb is large enough for IPv4/IPv6 header") Suggested-by: NSabrina Dubroca <sd@queasysnail.net> Signed-off-by: NPhillip Potter <phil@philpotter.co.uk> Acked-by: NSabrina Dubroca <sd@queasysnail.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录