Re: [PATCH net v4 3/3] net: prevent address rewrite in kernel_bind()
From: Paolo Abeni <pabeni@redhat.com>
Date: 2023-09-21 17:09:13
Also in:
stable
From: Paolo Abeni <pabeni@redhat.com>
Date: 2023-09-21 17:09:13
Also in:
stable
On Wed, 2023-09-20 at 09:30 -0400, Willem de Bruijn wrote:
Jordan Rife wrote:quoted
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() with kernel_bind() Link: https://lore.kernel.org/netdev/20230912013332.2048422-1-jrife@google.com/ (local) Fixes: 4fbac77d2d09 ("bpf: Hooks for sys_bind") Cc: stable@vger.kernel.org Signed-off-by: Jordan Rife <redacted>Reviewed-by: Willem de Bruijn <willemb@google.com>
I fear this is going to cause a few conflicts with other trees. We can still take it, but at very least we will need some acks from the relevant maintainers. I *think* it would be easier split this and patch 1/3 in individual patches targeting the different trees, hopefully not many additional patches will be required. What do you think? Cheers, Paolo