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] [day] [month] [year] [list]
Date:   Sat, 18 Jul 2020 02:10:23 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     syzbot <syzbot+ed318e8b790ca72c5ad0@...kaller.appspotmail.com>
Cc:     akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        netdev@...r.kernel.org, syzkaller-bugs@...glegroups.com,
        torvalds@...ux-foundation.org, william.kucharski@...cle.com,
        yang.shi@...ux.alibaba.com, ziy@...dia.com
Subject: Re: general protection fault in khugepaged

On Fri, Jul 17, 2020 at 03:40:04PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit ffe945e633b527d5a4577b42cbadec3c7cbcf096
> Author: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Date:   Wed Jun 3 23:00:09 2020 +0000
> 
>     khugepaged: do not stop collapse if less than half PTEs are referenced
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17356c2f100000
> start commit:   e44f65fd xen-netfront: remove redundant assignment to vari..
> git tree:       net-next
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=14b56c2f100000
> console output: https://syzkaller.appspot.com/x/log.txt?x=10b56c2f100000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=829871134ca5e230
> dashboard link: https://syzkaller.appspot.com/bug?extid=ed318e8b790ca72c5ad0
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=113406a7100000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=175597d3100000
> 
> Reported-by: syzbot+ed318e8b790ca72c5ad0@...kaller.appspotmail.com
> Fixes: ffe945e633b5 ("khugepaged: do not stop collapse if less than half PTEs are referenced")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 

My guess is that anonymous VMA got replaced by file VMA under us.

Could you reproduce the issue with the patch below? I have hard time
triggering it myself.

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index b043c40a21d4..f8ec58a1e72b 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1107,6 +1107,8 @@ static void collapse_huge_page(struct mm_struct *mm,
 	if (mm_find_pmd(mm, address) != pmd)
 		goto out;
 
+	if (!vma->anon_vma)
+		dump_vma(vma);
 	anon_vma_lock_write(vma->anon_vma);
 
 	mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm,
-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ