diff options
author | Jordan Rife <jrife@google.com> | 2023-09-21 18:46:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 21:46:43 +0200 |
commit | 53b700b41a0668d321ba4653304f51f09095278c (patch) | |
tree | 0dc998c0ad13652f455346a01dc50e6b9f033059 /arch | |
parent | 3c4bfa7a56c8b363511c90f95159e6f1b68a434a (diff) | |
download | linux-stable-53b700b41a0668d321ba4653304f51f09095278c.tar.gz linux-stable-53b700b41a0668d321ba4653304f51f09095278c.tar.bz2 linux-stable-53b700b41a0668d321ba4653304f51f09095278c.zip |
net: replace calls to sock->ops->connect() with kernel_connect()
commit 26297b4ce1ce4ea40bc9a48ec99f45da3f64d2e2 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions