summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-10-07 11:58:29 +0200
committerDavid Howells <dhowells@redhat.com>2019-10-07 12:05:05 +0200
commit55f6c98e3674ce16038a1949c3f9ca5a9a99f289 (patch)
tree83abbc62305d829243847ef9a83e4074560ef20e /net/rxrpc/conn_client.c
parentrxrpc: Fix call ref leak (diff)
downloadlinux-55f6c98e3674ce16038a1949c3f9ca5a9a99f289.tar.xz
linux-55f6c98e3674ce16038a1949c3f9ca5a9a99f289.zip
rxrpc: Fix trace-after-put looking at the put peer record
rxrpc_put_peer() calls trace_rxrpc_peer() after it has done the decrement of the refcount - which looks at the debug_id in the peer record. But unless the refcount was reduced to zero, we no longer have the right to look in the record and, indeed, it may be deleted by some other thread. Fix this by getting the debug_id out before decrementing the refcount and then passing that into the tracepoint. This can cause the following symptoms: BUG: KASAN: use-after-free in __rxrpc_put_peer net/rxrpc/peer_object.c:411 [inline] BUG: KASAN: use-after-free in rxrpc_put_peer+0x685/0x6a0 net/rxrpc/peer_object.c:435 Read of size 8 at addr ffff888097ec0058 by task syz-executor823/24216 Fixes: 1159d4b496f5 ("rxrpc: Add a tracepoint to track rxrpc_peer refcounting") Reported-by: syzbot+b9be979c55f2bea8ed30@syzkaller.appspotmail.com Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_client.c')
0 files changed, 0 insertions, 0 deletions