[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e3085fe8-3dae-40b2-970f-b8cda956a8f5@rbox.co>
Date: Fri, 17 Jan 2025 23:02:58 +0100
From: Michal Luczaj <mhal@...x.co>
To: Stefano Garzarella <sgarzare@...hat.com>
Cc: netdev@...r.kernel.org, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
Luigi Leonardi <leonardi@...hat.com>, "David S. Miller"
<davem@...emloft.net>, Wongi Lee <qwerty@...ori.io>,
Eugenio PĂ©rez <eperezma@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
kvm@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>, Jason Wang <jasowang@...hat.com>,
Simon Horman <horms@...nel.org>, Hyunwoo Kim <v4bel@...ori.io>,
Jakub Kicinski <kuba@...nel.org>, virtualization@...ts.linux.dev,
stable@...r.kernel.org
Subject: Re: [PATCH net v2 1/5] vsock/virtio: discard packets if the transport
changes
On 1/16/25 09:57, Stefano Garzarella wrote:
> On Tue, Jan 14, 2025 at 05:31:08PM +0100, Michal Luczaj wrote:
>>> ...
>>> 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/
Thanks,
Michal
Powered by blists - more mailing lists