From: David Howells <dhowells@redhat.com>
To: Hillf Danton <hdanton@sina.com>
Cc: dhowells@redhat.com,
syzbot <syzbot+3538a6a72efa8b059c38@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] KASAN: use-after-free Read in rxrpc_lookup_local
Date: Wed, 07 Dec 2022 11:57:48 +0000 [thread overview]
Message-ID: <1359657.1670414268@warthog.procyon.org.uk> (raw)
In-Reply-To: <20221207030740.7663-1-hdanton@sina.com>
Hillf Danton <hdanton@sina.com> wrote:
> To fix the uaf, destroy local in workqueue because of hlist_del under mutex.
Hmmm... That can't be the whole explanation. As you say, the hlist_del is
done under the mutex in rxrpc_destroy_local() - the same as the
hlist_add/hlist_replace and the search in rxrpc_lookup_local().
There should be no need to bump it off to a worker thread - the destruction is
in process context already - and doing the destruction not in the I/O thread
violates other assumptions, so I'm not convinced this patch is a valid fix.
I wonder if, under some circumstances, the I/O thread is managing to start and
destroy itself *before* rxrpc_lookup_local() adds itself to the
local_endpoints list. Possibly I should offload the add to the I/O thread and
use a completion to wait for it to set up.
David
next prev parent reply other threads:[~2022-12-07 12:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221207030740.7663-1-hdanton@sina.com>
2022-12-07 3:42 ` [syzbot] KASAN: use-after-free Read in rxrpc_lookup_local syzbot
2022-12-07 11:57 ` David Howells [this message]
[not found] ` <20221207134234.7879-1-hdanton@sina.com>
2022-12-07 16:30 ` David Howells
2022-12-06 16:34 syzbot
2022-12-06 21:09 ` David Howells
2022-12-07 3:09 ` syzbot
2022-12-07 17:43 ` David Howells
2022-12-07 23:16 ` syzbot
[not found] ` <20221208035617.8037-1-hdanton@sina.com>
2022-12-08 8:53 ` David Howells
2022-12-08 11:20 ` David Howells
2022-12-08 12:02 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359657.1670414268@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+3538a6a72efa8b059c38@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox