syzbot


KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare

Status: moderation: reported on 2025/08/29 03:16
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+7fbe71f971ba56626d82@syzkaller.appspotmail.com
First crash: 17h41m, last: 17h41m

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

write to 0xffff88811a78b700 of 8 bytes by task 5708 on cpu 1:
 __anon_vma_prepare+0x172/0x2f0 mm/rmap.c:213
 __vmf_anon_prepare+0x91/0x100 mm/memory.c:3506
 hugetlb_no_page mm/hugetlb.c:6471 [inline]
 hugetlb_fault+0x770/0x1b50 mm/hugetlb.c:6725
 handle_mm_fault+0x1861/0x2c20 mm/memory.c:6362
 faultin_page mm/gup.c:1144 [inline]
 __get_user_pages+0x102e/0x1fa0 mm/gup.c:1446
 populate_vma_page_range mm/gup.c:1880 [inline]
 __mm_populate+0x243/0x3a0 mm/gup.c:1983
 mm_populate include/linux/mm.h:3367 [inline]
 vm_mmap_pgoff+0x232/0x2e0 mm/util.c:585
 ksys_mmap_pgoff+0x2d0/0x310 mm/mmap.c:604
 x64_sys_call+0x14a3/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:10
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811a78b700 of 8 bytes by task 5707 on cpu 0:
 __vmf_anon_prepare+0x26/0x100 mm/memory.c:3500
 hugetlb_no_page mm/hugetlb.c:6471 [inline]
 hugetlb_fault+0x770/0x1b50 mm/hugetlb.c:6725
 handle_mm_fault+0x1861/0x2c20 mm/memory.c:6362
 do_user_addr_fault+0x3fe/0x1090 arch/x86/mm/fault.c:1387
 handle_page_fault arch/x86/mm/fault.c:1476 [inline]
 exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:68
 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline]
 copy_to_user_iter lib/iov_iter.c:25 [inline]
 iterate_ubuf include/linux/iov_iter.h:30 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:302 [inline]
 iterate_and_advance include/linux/iov_iter.h:330 [inline]
 _copy_to_iter+0x141/0xe70 lib/iov_iter.c:185
 copy_to_iter include/linux/uio.h:220 [inline]
 simple_copy_to_iter net/core/datagram.c:521 [inline]
 __skb_datagram_iter+0xc6/0x690 net/core/datagram.c:402
 skb_copy_datagram_iter+0x3d/0x110 net/core/datagram.c:535
 skb_copy_datagram_msg include/linux/skbuff.h:4167 [inline]
 unix_stream_read_actor+0x43/0x70 net/unix/af_unix.c:3135
 unix_stream_read_generic+0x6b1/0x1580 net/unix/af_unix.c:3058
 unix_stream_recvmsg+0xc3/0xf0 net/unix/af_unix.c:3172
 sock_recvmsg_nosec net/socket.c:1065 [inline]
 sock_recvmsg+0x136/0x170 net/socket.c:1087
 ____sys_recvmsg+0xf5/0x280 net/socket.c:2834
 ___sys_recvmsg+0x11f/0x370 net/socket.c:2876
 __sys_recvmsg net/socket.c:2909 [inline]
 __do_sys_recvmsg net/socket.c:2915 [inline]
 __se_sys_recvmsg net/socket.c:2912 [inline]
 __x64_sys_recvmsg+0xd1/0x160 net/socket.c:2912
 x64_sys_call+0x2b42/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:48
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffff8881270b8d68

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5707 Comm: syz.6.491 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/29 03:16 upstream 07d9df80082b d401b9d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare
* Struck through repros no longer work on HEAD.