Unverified Commit a67d5429 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1287 ipvlan:Fix out-of-bounds caused by unclear skb->cb

parents 86ef346b 2572b83c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -437,6 +437,9 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
		goto err;
	}
	skb_dst_set(skb, &rt->dst);

	memset(IPCB(skb), 0, sizeof(*IPCB(skb)));

	err = ip_local_out(net, skb->sk, skb);
	if (unlikely(net_xmit_eval(err)))
		dev->stats.tx_errors++;
@@ -475,6 +478,9 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
		goto err;
	}
	skb_dst_set(skb, dst);

	memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));

	err = ip6_local_out(net, skb->sk, skb);
	if (unlikely(net_xmit_eval(err)))
		dev->stats.tx_errors++;