WSL2-Linux-Kernel/net/rds
Jordan Rife 5b5e58299e net: prevent address rewrite in kernel_bind()
commit c889a99a21 upstream.

Similar to the change in commit 0bdf399342c5("net: Avoid address
overwrite in kernel_connect"), BPF hooks run on bind may rewrite the
address passed to kernel_bind(). This change

1) Makes a copy of the bind address in kernel_bind() to insulate
   callers.
2) Replaces direct calls to sock->ops->bind() in net with kernel_bind()

Link: https://lore.kernel.org/netdev/20230912013332.2048422-1-jrife@google.com/
Fixes: 4fbac77d2d ("bpf: Hooks for sys_bind")
Cc: stable@vger.kernel.org
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jordan Rife <jrife@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:05:33 +02:00
..
Kconfig
Makefile
af_rds.c
bind.c
cong.c
connection.c rds: memory leak in __rds_conn_create() 2021-12-22 09:32:42 +01:00
ib.c
ib.h
ib_cm.c
ib_frmr.c net/rds: dma_map_sg is entitled to merge entries 2021-08-18 15:35:50 -07:00
ib_mr.h
ib_rdma.c
ib_recv.c rds: add missing barrier to release_refill 2022-08-25 11:39:54 +02:00
ib_ring.c rds: Fix spelling mistakes 2021-05-31 22:45:05 -07:00
ib_send.c
ib_stats.c
ib_sysctl.c
info.c
info.h
loop.c
loop.h
message.c rds: rds_rm_zerocopy_callback() correct order for list_add_tail() 2023-03-10 09:39:16 +01:00
page.c
rdma.c
rdma_transport.c net: rds: Fix possible NULL-pointer dereference 2023-10-06 13:18:08 +02:00
rdma_transport.h
rds.h
rds_single_path.h
recv.c net: rds: fix memory leak in rds_recvmsg 2021-06-08 16:32:17 -07:00
send.c
stats.c
sysctl.c
tcp.c net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks() 2022-10-26 12:34:49 +02:00
tcp.h RDS tcp loopback connection can hang 2021-05-21 14:46:59 -07:00
tcp_connect.c net: prevent address rewrite in kernel_bind() 2023-10-19 23:05:33 +02:00
tcp_listen.c net: prevent address rewrite in kernel_bind() 2023-10-19 23:05:33 +02:00
tcp_recv.c rds: Fix spelling mistakes 2021-05-31 22:45:05 -07:00
tcp_send.c
tcp_stats.c
threads.c
transport.c