All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv" has been added to the 4.10-stable tree
@ 2017-03-18 14:05 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-18 14:05 UTC (permalink / raw)
  To: phueber, davem, gregkh; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From foo@baz Sat Mar 18 22:03:53 CST 2017
From: Paul H�ber <phueber@kernsp.in>
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 <phueber@kernsp.in>


[ 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 <phueber@kernsp.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-18 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-18 14:05 Patch "l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv" has been added to the 4.10-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.