syzbot


KCSAN: data-race in call_rcu / mas_state_walk (2)

Status: moderation: reported on 2025/04/25 11:57
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+c340ed86ab0dac6ba5a7@syzkaller.appspotmail.com
First crash: 1d01h, last: 1d01h
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in call_rcu / mas_state_walk mm 284 472d 725d 0/28 auto-obsoleted due to no activity on 2024/02/06 14:05

Sample crash report:
==================================================================
BUG: KCSAN: data-race in call_rcu / mas_state_walk

write to 0xffff888104554808 of 8 bytes by task 8820 on cpu 0:
 __call_rcu_common kernel/rcu/tree.c:3081 [inline]
 call_rcu+0x48/0x3e0 kernel/rcu/tree.c:3202
 ma_free_rcu lib/maple_tree.c:211 [inline]
 mas_topiary_node lib/maple_tree.c:2519 [inline]
 mas_topiary_replace lib/maple_tree.c:2625 [inline]
 mas_wmb_replace+0xf7b/0x14a0 lib/maple_tree.c:2641
 mas_split lib/maple_tree.c:3368 [inline]
 mas_commit_b_node lib/maple_tree.c:3388 [inline]
 mas_wr_bnode lib/maple_tree.c:4049 [inline]
 mas_wr_store_entry+0x17ae/0x2b60 lib/maple_tree.c:4090
 mas_store_prealloc+0x74d/0x9e0 lib/maple_tree.c:5475
 vma_iter_store_overwrite mm/vma.h:448 [inline]
 vma_iter_store_new+0x1c5/0x200 mm/vma.h:455
 vma_complete+0x125/0x570 mm/vma.c:323
 __split_vma+0x54c/0x610 mm/vma.c:523
 split_vma mm/vma.c:553 [inline]
 vma_modify+0x107/0x210 mm/vma.c:1579
 vma_modify_flags+0x101/0x130 mm/vma.c:1605
 mprotect_fixup+0x2cc/0x570 mm/mprotect.c:658
 do_mprotect_pkey+0x6d6/0x980 mm/mprotect.c:832
 __do_sys_mprotect mm/mprotect.c:853 [inline]
 __se_sys_mprotect mm/mprotect.c:850 [inline]
 __x64_sys_mprotect+0x48/0x60 mm/mprotect.c:850
 x64_sys_call+0x2794/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:11
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888104554808 of 8 bytes by task 8822 on cpu 1:
 mtree_range_walk lib/maple_tree.c:2769 [inline]
 mas_state_walk+0x28f/0x650 lib/maple_tree.c:3605
 mas_walk+0x30/0x120 lib/maple_tree.c:4905
 lock_vma_under_rcu+0xa2/0x2f0 mm/memory.c:6553
 do_user_addr_fault+0x233/0x1090 arch/x86/mm/fault.c:1328
 handle_page_fault arch/x86/mm/fault.c:1480 [inline]
 exc_page_fault+0x54/0xc0 arch/x86/mm/fault.c:1538
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x0000555575a12fff -> 0xffff8881045d3108

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8822 Comm: syz.1.1861 Not tainted 6.15.0-rc3-syzkaller-00094-g02ddfb981de8 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/25 11:56 upstream 02ddfb981de8 e3715315 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in call_rcu / mas_state_walk
* Struck through repros no longer work on HEAD.