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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220427175218.cazytgdlpc6lpn45@revolver>
Date:   Wed, 27 Apr 2022 17:52:24 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     syzbot <syzbot+7728e4ab5371cebc9c00@...kaller.appspotmail.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "syzkaller-bugs@...glegroups.com" <syzkaller-bugs@...glegroups.com>,
        Peter Xu <peterx@...hat.com>,
        Qian Cai <quic_qiancai@...cinc.com>
Subject: Re: [syzbot] WARNING in vma_merge

* Andrew Morton <akpm@...ux-foundation.org> [220427 13:20]:
> On Wed, 27 Apr 2022 06:15:20 -0700 syzbot <syzbot+7728e4ab5371cebc9c00@...kaller.appspotmail.com> wrote:
> 
> > syzbot has found a reproducer for the following issue on:
> 
> Thanks.
> 
> userfaultfd_release() appears to have offended vma_merge().

Potentially apply_mlockall_flags() and not userfaultfd_release(). There
is a potential that the vma iterator is stale if a split/merge succeeds,
although KASAN should pick this up and KASAN is active according to the
config below. I've sent a patch for the mlockall issue after Qian Cai's
reported it to linux-mm.

> 
> I'm not seeing any changes in that area from Peter, but Liam's
> mapletree work changed things around a bit.  Gents, could you please
> take a look?
> 
> 
> > HEAD commit:    f02ac5c95dfd Add linux-next specific files for 20220427
> > git tree:       linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=105a33a2f00000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=e9256c70f586da8a
> > dashboard link: https://syzkaller.appspot.com/bug?extid=7728e4ab5371cebc9c00
> > compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15f76f82f00000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12b42c3cf00000
> > 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+7728e4ab5371cebc9c00@...kaller.appspotmail.com
> > 
> > ------------[ cut here ]------------
> > WARNING: CPU: 0 PID: 3593 at mm/mmap.c:1072 vma_merge+0x428/0x950 mm/mmap.c:1072
> 
> I assume this is
> 
> 		VM_WARN_ON(area && end > area->vm_end);
> 
> But lines change around a lot.  It would be great if the script which
> generates these reports could quote the code around the indicated file
> and line.  Like:
> 
> 	next = find_vma(mm, prev ? prev->vm_end : 0);
> 	area = next;
> 	if (area && area->vm_end == end)		/* cases 6, 7, 8 */
> 		next = find_vma(mm, next->vm_end);
> 
> 	/* verify some invariant that must be enforced by the caller */
> 	VM_WARN_ON(prev && addr <= prev->vm_start);
> -->	VM_WARN_ON(area && end > area->vm_end);
> 	VM_WARN_ON(addr >= end);
> 
> 	/*
> 	 * Can it merge with the predecessor?
> 	 */
> 	if (prev && prev->vm_end == addr &&


That is the correct line according to the git tree and HEAD commit
listed above.

I cannot get this issue to trigger with the given tree and git repo with
my config.  I will try again with the kernel config above.

Thanks,
Liam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ