WSL2-Linux-Kernel/net/ceph
Jordan Rife 58f0e6324e libceph: use kernel_connect()
commit 7563cf17dc upstream.

Direct calls to ops->connect() can overwrite the address parameter when
used in conjunction with BPF SOCK_ADDR hooks. Recent changes to
kernel_connect() ensure that callers are insulated from such side
effects. This patch wraps the direct call to ops->connect() with
kernel_connect() to prevent unexpected changes to the address passed to
ceph_tcp_connect().

This change was originally part of a larger patch targeting the net tree
addressing all instances of unprotected calls to ops->connect()
throughout the kernel, but this change was split up into several patches
targeting various trees.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/netdev/20230821100007.559638-1-jrife@google.com/
Link: https://lore.kernel.org/netdev/9944248dba1bce861375fcce9de663934d933ba9.camel@redhat.com/
Fixes: d74bad4e74 ("bpf: Hooks for sys_connect")
Signed-off-by: Jordan Rife <jrife@google.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:05:36 +02:00
..
crush
Kconfig
Makefile
armor.c
auth.c libceph: remove unnecessary ret variable in ceph_auth_init() 2021-06-28 23:49:25 +02:00
auth_none.c libceph: kill ceph_none_authorizer::reply_buf 2021-06-28 23:49:25 +02:00
auth_none.h libceph: kill ceph_none_authorizer::reply_buf 2021-06-28 23:49:25 +02:00
auth_x.c libceph: set global_id as soon as we get an auth ticket 2021-06-24 21:03:17 +02:00
auth_x.h
auth_x_protocol.h libceph: fix some spelling mistakes 2021-06-28 23:49:25 +02:00
buffer.c
ceph_common.c
ceph_hash.c
ceph_strings.c
cls_lock_client.c libceph: fix doc warnings in cls_lock_client.c 2021-06-28 23:49:25 +02:00
crypto.c
crypto.h
debugfs.c
decode.c
messenger.c libceph: use kernel_connect() 2023-10-19 23:05:36 +02:00
messenger_v1.c
messenger_v2.c libceph: harden msgr2.1 frame segment length checks 2023-07-23 13:47:53 +02:00
mon_client.c libceph: fix some spelling mistakes 2021-06-28 23:49:25 +02:00
msgpool.c
osd_client.c libceph: fix potential hang in ceph_osdc_notify() 2023-08-11 15:13:55 +02:00
osdmap.c libceph: fix some spelling mistakes 2021-06-28 23:49:25 +02:00
pagelist.c
pagevec.c
snapshot.c
string_table.c
striper.c