From 8ef99891473e47c81edc8254c73e6b40ae6edfef Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 26 May 2022 09:51:07 +0200 Subject: [PATCH] ipq807x: fix a null pointer crash in ip_tunnel Fixes: WIFI-7571 Signed-off-by: John Crispin --- ...-null-pointer-dereference-in-iptunnel_xmit.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 feeds/ipq807x/ipq807x/patches/102-fix-null-pointer-dereference-in-iptunnel_xmit.patch diff --git a/feeds/ipq807x/ipq807x/patches/102-fix-null-pointer-dereference-in-iptunnel_xmit.patch b/feeds/ipq807x/ipq807x/patches/102-fix-null-pointer-dereference-in-iptunnel_xmit.patch new file mode 100644 index 000000000..f129274b4 --- /dev/null +++ b/feeds/ipq807x/ipq807x/patches/102-fix-null-pointer-dereference-in-iptunnel_xmit.patch @@ -0,0 +1,13 @@ +Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/net/ipv4/ip_tunnel_core.c +=================================================================== +--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/net/ipv4/ip_tunnel_core.c ++++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/net/ipv4/ip_tunnel_core.c +@@ -86,7 +86,7 @@ void iptunnel_xmit(struct sock *sk, stru + in_dev = __dev_get_by_index(&init_net, skb_iif); + } + +- if (proto == IPPROTO_IPV6 || proto == IPPROTO_GRE || netif_is_vxlan(in_dev)) { ++ if (proto == IPPROTO_IPV6 || proto == IPPROTO_GRE || (in_dev && netif_is_vxlan(in_dev))) { + skb->skb_iif = skb_iif; + } +