Skip to contentSkip to conversation

Patch "l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 18, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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.9-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.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sat Mar 18 22:03:25 CST 2017

From: Paul H�ber <[email protected]>
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 <[email protected]>

[ 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.

---
 net/l2tp/l2tp_ip.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/l2tp/l2tp_ip.c +1 -1
@@ -388,7 +388,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 [email protected] are

queue-4.9/l2tp-avoid-use-after-free-caused-by-l2tp_ip_backlog_recv.patch