l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv

am: 2cd0afc64e

Change-Id: Ib7bcb274c63e13807b1e25f74b6018866e2d8eb1
This commit is contained in:
Paul Hber
2017-03-22 11:29:11 +00:00
committed by android-build-merger

View File

@@ -383,7 +383,7 @@ static int l2tp_ip_backlog_recv(struct sock *sk, struct sk_buff *skb)
drop:
IP_INC_STATS(sock_net(sk), IPSTATS_MIB_INDISCARDS);
kfree_skb(skb);
return -1;
return 0;
}
/* Userspace will call sendmsg() on the tunnel socket to send L2TP