diff options
| author | 2026-10-12 15:54:20 +0200 | |
|---|---|---|
| committer | 2026-10-12 15:59:11 +0200 | |
| commit | 3a82195416fd71fdd6cb4ff80f611ec28073be16 (patch) | |
| tree | 1f0d4e22bb7c72ca809124264671469658fbadee /scripts/Makefile.thinlto | |
| parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
net: devmem: check uid and netns in net_devmem_get_binding()
NETDEV_CMD_BIND_TX is unprivileged, and dmabuf binding IDs are allocated
from a single global xarray. Currently net_devmem_get_binding() looks up
the binding by ID without checking whether the sending socket belongs to
the same user or network namespace that created the binding.
Record the creating netlink socket's network namespace and UID on the
binding, and verify both in net_devmem_get_binding() before checking the
route destination device. Return -EINVAL on mismatch so callers cannot
distinguish non-existent IDs from bindings owned by other users.
Fixes: bd61848900bf ("net: devmem: Implement TX path")
Signed-off-by: Kaifeng Wang <kaifengw@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
