KCSAN: data-race in vm_area_dup / vma_interval_tree_remove (2)

8 views
Skip to first unread message

syzbot

unread,
Feb 21, 2020, 7:48:13 AM2/21/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: b12d66a6 mm, kcsan: Instrument SLAB free with ASSERT_EXCLU..
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=15c9c36ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=10bc0131c4924ba9
dashboard link: https://syzkaller.appspot.com/bug?extid=02a535c1117e6d07b966
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+02a535...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in vm_area_dup / vma_interval_tree_remove

write to 0xffff888126310458 of 8 bytes by task 10741 on cpu 0:
vma_interval_tree_augment_copy mm/interval_tree.c:23 [inline]
__rb_erase_augmented include/linux/rbtree_augmented.h:247 [inline]
rb_erase_augmented include/linux/rbtree_augmented.h:303 [inline]
rb_erase_augmented_cached include/linux/rbtree_augmented.h:314 [inline]
vma_interval_tree_remove+0x58b/0x8b0 mm/interval_tree.c:23
__remove_shared_vm_struct+0xad/0xd0 mm/mmap.c:148
unlink_file_vma+0x69/0x90 mm/mmap.c:163
free_pgtables+0x14f/0x200 mm/memory.c:414
exit_mmap+0x151/0x300 mm/mmap.c:3131
__mmput kernel/fork.c:1082 [inline]
mmput+0xea/0x280 kernel/fork.c:1103
exit_mm kernel/exit.c:485 [inline]
do_exit+0x60d/0x18a0 kernel/exit.c:788
do_group_exit+0xb4/0x1c0 kernel/exit.c:899
__do_sys_exit_group kernel/exit.c:910 [inline]
__se_sys_exit_group kernel/exit.c:908 [inline]
__x64_sys_exit_group+0x2e/0x30 kernel/exit.c:908
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8881263103e8 of 200 bytes by task 10740 on cpu 1:
vm_area_dup+0x70/0xf0 kernel/fork.c:362
__split_vma+0x88/0x350 mm/mmap.c:2646
split_vma+0x73/0xa0 mm/mmap.c:2704
mprotect_fixup+0x3e8/0x510 mm/mprotect.c:407
do_mprotect_pkey+0x3eb/0x660 mm/mprotect.c:553
__do_sys_mprotect mm/mprotect.c:578 [inline]
__se_sys_mprotect mm/mprotect.c:575 [inline]
__x64_sys_mprotect+0x51/0x70 mm/mprotect.c:575
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 10740 Comm: blkid Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Marco Elver

unread,
Feb 21, 2020, 9:36:25 AM2/21/20
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz fix: fork: Annotate a data race in vm_area_dup()
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/00000000000039177e059f156f1d%40google.com.
Reply all
Reply to author
Forward
0 new messages