> vsock_deliver_tap() clones every packet to every vsockmon device on the
> system. Creating one needs only CAP_NET_ADMIN in the owning user
> namespace, so an unprivileged user can capture the traffic of local mode
> namespaces.
>
> Pass the packet's netns to vsock_deliver_tap() and only deliver to
> devices that pass vsock_net_check_mode(), the same rule socket lookups
> use. vhost passes the vhost_vsock netns, loopback the sending socket's
> netns, and virtio-vsock NULL (global mode).
>
> Fixes: a69686327e42 ("vsock: add netns support to virtio transports")
> Signed-off-by: Bobby Eshleman <[email protected]>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=1