syzbot


KCSAN: data-race in mas_wr_store_entry / mtree_range_walk

Status: upstream: reported on 2024/09/23 09:04
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+e01fa33e67abb0b3b3bb@syzkaller.appspotmail.com
First crash: 22d, last: 10h05m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KCSAN: data-race in mas_wr_store_entry / mtree_range_walk 4 (5) 2024/09/23 13:59

Sample crash report:
==================================================================
BUG: KCSAN: data-race in mas_wr_store_entry / mtree_range_walk

write to 0xffff888111808c10 of 8 bytes by task 4580 on cpu 0:
 mas_wr_slot_store lib/maple_tree.c:3889 [inline]
 mas_wr_store_entry+0x146b/0x2d00 lib/maple_tree.c:4075
 mas_store_prealloc+0x6bf/0x960 lib/maple_tree.c:5520
 vma_iter_store mm/vma.h:470 [inline]
 commit_merge+0x441/0x740 mm/vma.c:609
 vma_expand+0x211/0x360 mm/vma.c:1024
 vma_merge_new_range+0x2cf/0x3e0 mm/vma.c:963
 mmap_region+0x887/0x16e0 mm/mmap.c:1416
 do_mmap+0x718/0xb60 mm/mmap.c:496
 vm_mmap_pgoff+0x133/0x290 mm/util.c:588
 ksys_mmap_pgoff+0xd0/0x330 mm/mmap.c:542
 x64_sys_call+0x1884/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:10
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888111808c10 of 8 bytes by task 4588 on cpu 1:
 mtree_range_walk+0x1b4/0x460 lib/maple_tree.c:2779
 mas_state_walk lib/maple_tree.c:3601 [inline]
 mas_walk+0x16e/0x320 lib/maple_tree.c:4948
 lock_vma_under_rcu+0x95/0x260 mm/memory.c:6224
 do_user_addr_fault arch/x86/mm/fault.c:1329 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x150/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x00007f108c2aefff -> 0x00007f108c28dfff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4588 Comm: syz.4.257 Not tainted 6.12.0-rc3-syzkaller-00013-geca631b8fe80 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/15 02:50 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/14 09:26 upstream 6485cf5ea253 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/13 11:39 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/05 00:02 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/03 18:50 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/03 07:53 upstream f23aa4c0761a a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/10/02 20:14 upstream e32cde8d2bd7 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/30 22:53 upstream 9852d85ec9d4 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/30 03:31 upstream e7ed34365879 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/29 13:43 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/28 07:05 upstream 3630400697a3 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/25 12:44 upstream 684a64bf32b6 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/24 04:07 upstream 18ba6034468e 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/23 16:58 upstream de5cb0dcb74c 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
2024/09/22 15:54 upstream 88264981f208 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mas_wr_store_entry / mtree_range_walk
* Struck through repros no longer work on HEAD.