kernel_samsung_a53x/net/rds
Jordan Rife 394b11a13a net: prevent address rewrite in kernel_bind()
commit c889a99a21bf124c3db08d09df919f0eccc5ea4c 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: 4fbac77d2d09 ("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>
2024-11-08 11:25:44 +01:00
..
af_rds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bind.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cong.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
connection.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_cm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_frmr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_mr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_recv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_ring.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_send.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib_sysctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
info.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
info.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
loop.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
message.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma_transport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma_transport.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rds_single_path.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
recv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
send.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_connect.c net: prevent address rewrite in kernel_bind() 2024-11-08 11:25:44 +01:00
tcp_listen.c net: prevent address rewrite in kernel_bind() 2024-11-08 11:25:44 +01:00
tcp_recv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_send.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
threads.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
transport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00