vmw_vsock sk_ack_backlog double decrement bug

2 messages, 2 authors, 2016-06-24 · open the first message on its own page

vmw_vsock sk_ack_backlog double decrement bug

From: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2016-06-23 15:41:02

Hi Jorgen,
virtio-vsock doesn't use vsock_pending_work() but I may have spotted a
problem that affects the VMCI transport.  I'm not sending a patch
because I can't test it.

1. During vsock_accept() listener->sk_ack_backlog is decremented.
2. vsock_pending_work() will decrement listener->sk_ack_backlog again if
   vsk->rejected.

The result is that sk_ack_backlog can be invalid.  It only happens in
the case where the listener socket has an error.  Maybe in practice it's
not a problem because the server application will close the listener
socket if there is an error...

Stefan

Re: vmw_vsock sk_ack_backlog double decrement bug

From: Jorgen S. Hansen <hidden>
Date: 2016-06-24 13:09:21

Hi Stefan,

Good catch. Thanks for pointing this out. I'll take care of fixing and testing this.
 
 Thanks,
 Jørgen
    
________________________________________
From: Stefan Hajnoczi <stefanha@redhat.com>
Sent: Thursday, June 23, 2016 5:40 PM
To: Jorgen S. Hansen
Cc: netdev@vger.kernel.org
Subject: vmw_vsock sk_ack_backlog double decrement bug

Hi Jorgen,
virtio-vsock doesn't use vsock_pending_work() but I may have spotted a
problem that affects the VMCI transport.  I'm not sending a patch
because I can't test it.

1. During vsock_accept() listener->sk_ack_backlog is decremented.
2. vsock_pending_work() will decrement listener->sk_ack_backlog again if
   vsk->rejected.

The result is that sk_ack_backlog can be invalid.  It only happens in
the case where the listener socket has an error.  Maybe in practice it's
not a problem because the server application will close the listener
socket if there is an error...

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