Thread (3 messages) 3 messages, 3 authors, 1d ago

Re: [PATCH net] tun: drop batched packets while the device is down

flat view

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2026-10-27 14:13:29

Xiao Liang wrote:
tun_sendmsg() handles TUN_MSG_PTR batches from vhost-net by calling
tun_xdp_one() instead of tun_get_user(). But this path does not check
IFF_UP, allowing packets from a guest to be injected into the host
receive path while the device is administratively down.

Check IFF_UP in tun_xdp_one() before running XDP or building an skb.
Drop the packet when the device is down, matching tun_get_user().

Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()")
Signed-off-by: Xiao Liang <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help