rxrpc: Fix use-after-free in rxrpc_put_local()
authorDavid Howells <dhowells@redhat.com>
Thu, 30 Jan 2020 21:50:35 +0000 (21:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:05 +0000 (04:35 -0800)
commit62221a9b1c9aef316ffa493340583827c045c2c0
treeaf409a49424af33be9f464390f6a5f4577e22ac7
parent5fa06c9568214537c42b32c9ec23ae0c70a4f8b7
rxrpc: Fix use-after-free in rxrpc_put_local()

[ Upstream commit fac20b9e738523fc884ee3ea5be360a321cd8bad ]

Fix rxrpc_put_local() to not access local->debug_id after calling
atomic_dec_return() as, unless that returned n==0, we no longer have the
right to access the object.

Fixes: 06d9532fa6b3 ("rxrpc: Fix read-after-free in rxrpc_queue_local()")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/rxrpc/local_object.c