lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YdbcSnIC22e7Rgyp@unreal>
Date:   Thu, 6 Jan 2022 14:10:50 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Hillf Danton <hdanton@...a.com>
Cc:     syzbot <syzbot+e3f96c43d19782dd14a7@...kaller.appspotmail.com>,
        jgg@...pe.ca, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, syzkaller-bugs@...glegroups.com,
        Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [syzbot] KASAN: use-after-free Read in ucma_destroy_private_ctx

On Wed, Jan 05, 2022 at 07:45:21PM +0800, Hillf Danton wrote:
> On Mon, 3 Jan 2022 20:47:02 +0200 Leon Romanovsky wrote:
> > On Mon, Jan 03, 2022 at 09:05:16AM -0800, syzbot wrote:
> > > Hello,
> > > 
> > > syzbot found the following issue on:
> > > 
> > > HEAD commit:    a8ad9a2434dc Merge tag 'efi-urgent-for-v5.16-2' of git://g..
> > > git tree:       upstream
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=10cf5253b00000
> > > kernel config:  https://syzkaller.appspot.com/x/.config?x=1a86c22260afac2f
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=e3f96c43d19782dd14a7
> > > compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > > 
> > > Unfortunately, I don't have any reproducer for this issue yet.
> > > 
> > > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > > Reported-by: syzbot+e3f96c43d19782dd14a7@...kaller.appspotmail.com
> > > 
> > > ==================================================================
> > > BUG: KASAN: use-after-free in ucma_cleanup_multicast drivers/infiniband/core/ucma.c:491 [inline]
> > > BUG: KASAN: use-after-free in ucma_destroy_private_ctx+0x914/0xb70 drivers/infiniband/core/ucma.c:579
> > > Read of size 8 at addr ffff88801bb74b00 by task syz-executor.1/25529
> > 
> > Jason,
> > 
> > Can it be race between ucma_process_join() and "if (refcount_read(&ctx->ref))"
> > check in ucma_destroy_private_ctx()?
> 
> Given cmpxchg in both ucma_close() and ucma_destroy_id(),
> ucma_destroy_private_ctx() can not run more than once, in addition to what
> is more weird is that the ucma_fops.release either is running in parallel
> to a writer or completes with a writer left behind. Light on if that weirdness
> is down to anything other than syzbot is highly appreciated.

Unless someone can shed the light, the repro will help here/

> 
> 	Hillf
> > 
> > The ucma_process_join() grabbed ctx, but released it in error path,
> > while ucma_destroy_private_ctx() was called without holding any locks?
> > 
> > Thanks
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ