Thread (26 messages) 26 messages, 5 authors, 2025-01-17

Re: [PATCH net v2 1/5] vsock/virtio: discard packets if the transport changes

From: Michal Luczaj <hidden>
Date: 2025-01-17 22:03:15
Also in: bpf, kvm, lkml, stable, virtualization

On 1/16/25 09:57, Stefano Garzarella wrote:
On Tue, Jan 14, 2025 at 05:31:08PM +0100, Michal Luczaj wrote:
quoted
quoted
...
Maybe we need to look better at the release, and prevent it from
removing the socket from the lists as you suggested, maybe adding a
function in af_vsock.c that all transports can call.
I'd be happy to submit a proper patch, but it would be helpful to decide
how close to AF_INET/AF_UNIX's behaviour is close enough. Or would you
rather have that UAF plugged first?
I'd say, let's fix the UAF first, then fix the behaviour (also in a
single series, but I prefer 2 separate patches if possible).
About that, AF_VSOCK was started with the goal of following AF_INET as
closely as possible, and the test suite should serve that as well, so if
we can solve this problem and get closer to AF_INET, possibly even
adding a dedicated test, that would be ideal!
All right, so let's keep the binding and allow removal from (un)bound list
only on socket destruction. This is transport independent, changes are
pretty minimal and, well, keeps the binding. Mixes well with the connect()
behaviour fix.

Let me know what you think:
https://lore.kernel.org/netdev/20250117-vsock-transport-vs-autobind-v1-0-c802c803762d@rbox.co/ (local)

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