Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Guillaume Nault
On Fri, Sep 15, 2017 at 04:55:02PM +0200, Sabrina Dubroca wrote: > 2017-09-15, 10:42:59 +0100, Tom Parkin wrote: > > On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > > > The tunnel is currently removed from the list during destruction. This > > > can lead to a double-free of the

Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Sabrina Dubroca
2017-09-15, 10:42:59 +0100, Tom Parkin wrote: > On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > > The tunnel is currently removed from the list during destruction. This > > can lead to a double-free of the struct sock if we try to delete the tunnel > > twice fast enough. > > >

Re: [PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Tom Parkin
On Fri, Sep 15, 2017 at 11:08:07AM +0200, Sabrina Dubroca wrote: > The tunnel is currently removed from the list during destruction. This > can lead to a double-free of the struct sock if we try to delete the tunnel > twice fast enough. > > The first delete operation does a lookup

[PATCH net] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-15 Thread Sabrina Dubroca
The tunnel is currently removed from the list during destruction. This can lead to a double-free of the struct sock if we try to delete the tunnel twice fast enough. The first delete operation does a lookup (l2tp_tunnel_get), finds the tunnel, calls l2tp_tunnel_delete, which queues it for