]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: sock_map, fix missing ulp check in sock hash case
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 3 Sep 2019 20:24:50 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:10:51 +0000 (09:10 +0200)
commit3c0bf14d186b69bf85ec0494aafe54c9f7755ab7
tree957ce1eb02771ddc8067d85b1fb04d2e7d84f7a4
parentf3724b27ca29953434861b5c78e3ec101c4561a3
net: sock_map, fix missing ulp check in sock hash case

[ Upstream commit 44580a0118d3ede95fec4dce32df5f75f73cd663 ]

sock_map and ULP only work together when ULP is loaded after the sock
map is loaded. In the sock_map case we added a check for this to fail
the load if ULP is already set. However, we missed the check on the
sock_hash side.

Add a ULP check to the sock_hash update path.

Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
Reported-by: syzbot+7a6ee4d0078eac6bf782@syzkaller.appspotmail.com
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/sock_map.c