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

!11522 ipv6: prevent UAF in ip6_send_skb()

parents 710a4bfc 96847f30
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2031,6 +2031,7 @@ int ip6_send_skb(struct sk_buff *skb)
	struct rt6_info *rt = (struct rt6_info *)skb_dst(skb);
	int err;

	rcu_read_lock();
	err = ip6_local_out(net, skb->sk, skb);
	if (err) {
		if (err > 0)
@@ -2040,6 +2041,7 @@ int ip6_send_skb(struct sk_buff *skb)
				      IPSTATS_MIB_OUTDISCARDS);
	}

	rcu_read_unlock();
	return err;
}