kcm: Only allow TCP sockets to be attached to a KCM mux
authorTom Herbert <tom@quantonium.net>
Wed, 24 Jan 2018 20:35:40 +0000 (12:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jan 2018 20:54:30 +0000 (15:54 -0500)
commit581e7226a5d43f629eb6399a121f85f6a15f81be
treebf1dde342aff9c631a516f2fc67525f2d1c283ee
parentd3303a65a00c94372ddab831570647488e6c06e2
kcm: Only allow TCP sockets to be attached to a KCM mux

TCP sockets for IPv4 and IPv6 that are not listeners or in closed
stated are allowed to be attached to a KCM mux.

Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module")
Reported-by: syzbot+8865eaff7f9acd593945@syzkaller.appspotmail.com
Signed-off-by: Tom Herbert <tom@quantonium.net>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/kcm/kcmsock.c