From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38792 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbdCROTn (ORCPT ); Sat, 18 Mar 2017 10:19:43 -0400 Subject: Patch "l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv" has been added to the 4.10-stable tree To: phueber@kernsp.in, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 18 Mar 2017 22:05:50 +0800 Message-ID: <14898459504845@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv to the 4.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: l2tp-avoid-use-after-free-caused-by-l2tp_ip_backlog_recv.patch and it can be found in the queue-4.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sat Mar 18 22:03:53 CST 2017 From: Paul H�ber Date: Sun, 26 Feb 2017 17:58:19 +0100 Subject: l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv From: Paul H�ber [ Upstream commit 51fb60eb162ab84c5edf2ae9c63cf0b878e5547e ] l2tp_ip_backlog_recv may not return -1 if the packet gets dropped. The return value is passed up to ip_local_deliver_finish, which treats negative values as an IP protocol number for resubmission. Signed-off-by: Paul Hüber Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/l2tp/l2tp_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c @@ -381,7 +381,7 @@ static int l2tp_ip_backlog_recv(struct s 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 Patches currently in stable-queue which might be from phueber@kernsp.in are queue-4.10/l2tp-avoid-use-after-free-caused-by-l2tp_ip_backlog_recv.patch