syzbot


KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (5)

Status: moderation: reported on 2025/04/14 22:30
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+0feecc6cd22af2f3b54d@syzkaller.appspotmail.com
First crash: 32d, last: 16d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (3) mm 5 278d 326d 0/28 auto-obsoleted due to no activity on 2024/09/15 23:12
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (4) mm 3 155d 178d 0/28 auto-obsoleted due to no activity on 2025/02/07 03:27
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (2) mm 123 385d 525d 0/28 auto-obsoleted due to no activity on 2024/05/31 23:05
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault mm 7 1372d 1452d 0/28 auto-closed as invalid on 2021/09/18 03:16

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __anon_vma_prepare / handle_mm_fault

write to 0xffff888116015a00 of 8 bytes by task 4601 on cpu 1:
 __anon_vma_prepare+0x172/0x2f0 mm/rmap.c:213
 __vmf_anon_prepare mm/memory.c:3432 [inline]
 vmf_anon_prepare mm/internal.h:415 [inline]
 do_anonymous_page mm/memory.c:4996 [inline]
 do_pte_missing mm/memory.c:4158 [inline]
 handle_pte_fault mm/memory.c:5997 [inline]
 __handle_mm_fault mm/memory.c:6140 [inline]
 handle_mm_fault+0x1e68/0x2ae0 mm/memory.c:6309
 do_user_addr_fault+0x3fe/0x1090 arch/x86/mm/fault.c:1388
 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
 __put_user_nocheck_4+0x3/0x10 arch/x86/lib/putuser.S:97
 ____sys_recvmsg+0x1a1/0x280 net/socket.c:2799
 ___sys_recvmsg+0x11f/0x370 net/socket.c:2828
 do_recvmmsg+0x1ef/0x540 net/socket.c:2923
 __sys_recvmmsg net/socket.c:2997 [inline]
 __do_sys_recvmmsg net/socket.c:3020 [inline]
 __se_sys_recvmmsg net/socket.c:3013 [inline]
 __x64_sys_recvmmsg+0xe5/0x170 net/socket.c:3013
 x64_sys_call+0x1c6a/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:300
 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 0xffff888116015a00 of 8 bytes by task 4605 on cpu 0:
 __vmf_anon_prepare mm/memory.c:3426 [inline]
 vmf_anon_prepare mm/internal.h:415 [inline]
 do_anonymous_page mm/memory.c:4996 [inline]
 do_pte_missing mm/memory.c:4158 [inline]
 handle_pte_fault mm/memory.c:5997 [inline]
 __handle_mm_fault mm/memory.c:6140 [inline]
 handle_mm_fault+0x1022/0x2ae0 mm/memory.c:6309
 faultin_page mm/gup.c:1193 [inline]
 __get_user_pages+0xde2/0x1d20 mm/gup.c:1491
 populate_vma_page_range mm/gup.c:1929 [inline]
 __mm_populate+0x243/0x3a0 mm/gup.c:2032
 mm_populate include/linux/mm.h:3487 [inline]
 vm_mmap_pgoff+0x232/0x2e0 mm/util.c:584
 ksys_mmap_pgoff+0xc2/0x310 mm/mmap.c:607
 x64_sys_call+0x1602/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:10
 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

value changed: 0x0000000000000000 -> 0xffff8881045984e0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4605 Comm: syz.4.421 Not tainted 6.15.0-rc4-syzkaller-00051-g7a13c14ee59d #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/01 04:15 upstream 7a13c14ee59d ce7952f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __anon_vma_prepare / handle_mm_fault
2025/04/14 22:30 upstream 8ffd015db85f 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __anon_vma_prepare / handle_mm_fault
* Struck through repros no longer work on HEAD.