immortalwrt/target/linux/generic/hack-4.19/950-fix-crash-nf_xfrm_me_harder.patch
CN_SZTL 86e526f93c
kernel: bump to 4.9.219, 4.14.176, 4.19.115
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-04-14 20:17:38 +08:00

12 lines
291 B
Diff

--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -115,6 +115,8 @@ int nf_xfrm_me_harder(struct net *net, s
return err;
dst = skb_dst(skb);
+ if (!dst)
+ return -EHOSTUNREACH;
if (dst->xfrm)
dst = ((struct xfrm_dst *)dst)->route;
if (!dst_hold_safe(dst))