Skip to contentSkip to conversation

Patch "dccp/tcp: do not inherit mc_list from parent" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message May 31, 2017

Subsystems (3)
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

dccp/tcp: do not inherit mc_list from parent

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:
dccp-tcp-do-not-inherit-mc_list-from-parent.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 Wed May 31 09:13:34 JST 2017

From: Eric Dumazet <[email protected]>
Date: Tue, 9 May 2017 06:29:19 -0700
Subject: dccp/tcp: do not inherit mc_list from parent

From: Eric Dumazet <[email protected]>

[ Upstream commit 657831ffc38e30092a2d5f03d385d710eb88b09a ]

syzkaller found a way to trigger double frees from ip_mc_drop_socket()

It turns out that leave a copy of parent mc_list at accept() time, which is very bad.

Very similar to commit 8b485ce69876 ("tcp: do not inherit fastopen_req from parent")

Initial report from Pray3r, completed by Andrey one. Thanks a lot to them !

---
 net/ipv4/inet_connection_sock.c |    2 ++
 1 file changed, 2 insertions(+)
net/ipv4/inet_connection_sock.c +2 -0
@@ -665,6 +665,8 @@ struct sock *inet_csk_clone_lock(const s
 		/* listeners have SOCK_RCU_FREE, not the children */
 		sock_reset_flag(newsk, SOCK_RCU_FREE);
 
+		inet_sk(newsk)->mc_list = NULL;
+
 		newsk->sk_mark = inet_rsk(req)->ir_mark;
 		atomic64_set(&newsk->sk_cookie,
 			     atomic64_read(&inet_rsk(req)->ir_cookie));

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ipv6-fix-out-of-bound-writes-in-__ip6_append_data.patch queue-4.9/tcp-eliminate-negative-reordering-in-tcp_clean_rtx_queue.patch queue-4.9/dccp-tcp-do-not-inherit-mc_list-from-parent.patch queue-4.9/tcp-avoid-fragmenting-peculiar-skbs-in-sack.patch queue-4.9/netem-fix-skb_orphan_partial.patch queue-4.9/net-fix-compile-error-in-skb_orphan_partial.patch queue-4.9/ipv6-dccp-do-not-inherit-ipv6_mc_list-from-parent.patch queue-4.9/sctp-do-not-inherit-ipv6_-mc-ac-fl-_list-from-parent.patch queue-4.9/ipv4-add-reference-counting-to-metrics.patch queue-4.9/tcp-avoid-fastopen-api-to-be-used-on-af_unspec.patch