Skip to content
Commit e11dea8f authored by Jordan Rife's avatar Jordan Rife Committed by Greg Kroah-Hartman
Browse files

dlm: use kernel_connect() and kernel_bind()

[ Upstream commit e9cdebbe ]

Recent changes to kernel_connect() and kernel_bind() ensure that
callers are insulated from changes to the address parameter made by BPF
SOCK_ADDR hooks. This patch wraps direct calls to ops->connect() and
ops->bind() with kernel_connect() and kernel_bind() to protect callers
in such cases.

Link: https://lore.kernel.org/netdev/9944248dba1bce861375fcce9de663934d933ba9.camel@redhat.com/


Fixes: d74bad4e ("bpf: Hooks for sys_connect")
Fixes: 4fbac77d ("bpf: Hooks for sys_bind")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJordan Rife <jrife@google.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fd7c2ffa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment