Jordan Rife 26297b4ce1 net: replace calls to sock->ops->connect() with kernel_connect()
commit 0bdf399342c5 ("net: Avoid address overwrite in kernel_connect")
ensured that kernel_connect() will not overwrite the address parameter
in cases where BPF connect hooks perform an address rewrite. This change
replaces direct calls to sock->ops->connect() in net with kernel_connect()
to make these call safe.

Link: https://lore.kernel.org/netdev/20230912013332.2048422-1-jrife@google.com/
Fixes: d74bad4e74ee ("bpf: Hooks for sys_connect")
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>
2023-10-01 19:31:29 +01:00
..
2020-09-18 14:12:43 -07:00
2021-05-31 22:45:05 -07:00
2020-11-17 15:22:06 -04:00
2020-05-20 14:08:06 -07:00
2016-12-26 21:35:39 -05:00
2016-06-18 21:34:09 -07:00
2011-07-01 16:16:19 -07:00