Re: [PATCH net] net: devmem: check uid and netns in net_devmem_get_binding()

From: Kaifeng Wang

Date: Mon Oct 05 2026 - 17:25:18 EST


This issue was found by the Sashiko code review bot on the netdev
mailing list (Message-ID:
<179007458060.2160803.1077952399417880240@xxxxxxxxxx>)
We verified it locally with a test that creates a TX dmabuf binding
via NETDEV_CMD_BIND_TX and sends packets from a socket owned by a
different UID or in a different network namespace. Without this patch,
the cross-UID and cross-netns sends succeed using the victim's dmabuf
binding ID; with this patch, net_devmem_get_binding() rejects them
with -EINVAL as expected.