[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzQlWq9EOi9jpy46@codewreck.org>
Date: Wed, 28 Sep 2022 19:43:38 +0900
From: asmadeus@...ewreck.org
To: Leon Romanovsky <leon@...nel.org>
Cc: syzbot <syzbot+67d13108d855f451cafc@...kaller.appspotmail.com>,
davem@...emloft.net, edumazet@...gle.com, ericvh@...il.com,
kuba@...nel.org, linux-kernel@...r.kernel.org,
linux_oss@...debyte.com, lucho@...kov.net, netdev@...r.kernel.org,
pabeni@...hat.com, syzkaller-bugs@...glegroups.com,
v9fs-developer@...ts.sourceforge.net
Subject: Re: [syzbot] KASAN: use-after-free Read in rdma_close
Leon Romanovsky wrote on Wed, Sep 28, 2022 at 01:07:23PM +0300:
> The bug is in commit 3ff51294a055 ("9p: p9_client_create: use p9_client_destroy on failure").
Thanks for looking
> It is wrong to call to p9_client_destroy() if clnt->trans_mod->create fails.
hmm that's a bit broad :)
But I agree I did get that wrong: trans_mod->close() wasn't called if
create failed.
We do want the idr_for_each_entry() that is in p9_client_destroy so
rather than revert the commit (fix a bug, create a new one..) I'd rather
split it out in an internal function that takes a 'bool close' or
something to not duplicate the rest.
(Bit of a nitpick, sure)
I'll send a patch and credit you in Reported-by unless you don't want
to.
--
Dominique
Powered by blists - more mailing lists