WARNING in vma_merge

From: Yikebaer Aizezi
Date: Wed Sep 27 2023 - 22:31:29 EST


Hello,

When using Healer to fuzz the Linux-6.6-rc3, the following crash
was triggered.

HEAD commit: 6465e260f48790807eef06b583b38ca9789b6072 ( Linux 6.6-rc3)
git tree: upstream

console output:
https://drive.google.com/file/d/1buerWpksX6CT-OKEQR74FqOO0YffAqtg/view?usp=drive_link
kernel config:https://drive.google.com/file/d/19l-irNJwbbXbjirevwkZpA67Wfw5DyOr/view?usp=drive_link
C reproducer:https://drive.google.com/file/d/1KDia7KFRB8cAuSikuZ2UCtWvpW69vbmJ/view?usp=drive_link
Syzlang reproducer:
https://drive.google.com/file/d/11Pbt5sdyZrqlMg35Go1dlH8IVBQjRKAI/view?usp=drive_link

My local Linux repository is a few commits behind the main branch, so
I pulled the latest branch and validated the crash on it. The issue
still persists.

If you fix this issue, please add the following tag to the commit:
Reported-by: Yikebaer Aizezi <yikebaer61@xxxxxxxxx>

------------[ cut here ]------------
WARNING: CPU: 2 PID: 261982 at mm/mmap.c:912 vma_merge+0x32e/0x3a20
mm/mmap.c:912
Modules linked in:
CPU: 2 PID: 261982 Comm: syz-executor.2 Not tainted 6.6.0-rc3-g6465e260f487 #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
RIP: 0010:vma_merge+0x32e/0x3a20 mm/mmap.c:912
Code: 80 3c 02 00 0f 85 1d 2e 00 00 48 8b 04 24 48 89 de 4c 8b 30 4c
89 f7 e8 20 73 c0 ff 49 39 de 0f 84 ce 16 00 00 e8 32 77 c0 ff <0f> 0b
e8 2b 77 c0 ff 4c 89 fe 48 89 df e8 00 73 c0 ff 4c 39 fb 0f
RSP: 0018:ffffc9001031fc10 EFLAGS: 00010212
RAX: 00000000000003e1 RBX: 0000000020ffc000 RCX: ffffc90003931000
RDX: 0000000000040000 RSI: ffffffff81c1631e RDI: 0000000000000006
RBP: ffff88802526c400 R08: 0000000000000006 R09: 0000000020ff9000
R10: 0000000020ffc000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000020ff9000 R15: 0000000020ffe000
FS: 00007f1220e18640(0000) GS:ffff888063d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7edcef66e4 CR3: 0000000021ae1000 CR4: 0000000000750ee0
PKRU: 55555554
Call Trace:
<TASK>
mbind_range+0x299/0x560 mm/mempolicy.c:834
__do_sys_set_mempolicy_home_node+0x4d3/0x830 mm/mempolicy.c:1561
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f122008eced
Code: c3 e8 97 2b 00 00 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 89 f8 48
89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1220e18028 EFLAGS: 00000246 ORIG_RAX: 00000000000001c2
RAX: ffffffffffffffda RBX: 00007f12201cbf80 RCX: 00007f122008eced
RDX: 0000000000000000 RSI: 0000000000004000 RDI: 0000000020ffa000
RBP: 00007f12200f04a6 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f12201cbf80 R15: 00007f1220df8000
</TASK>