syzbot


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

Status: upstream: reported on 2024/06/24 08:17
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+3d69e72f363bbb907374@syzkaller.appspotmail.com
First crash: 27d, last: 26d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (3) 0 (1) 2024/06/24 08:17
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (2) mm 123 84d 224d 0/27 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 1071d 1151d 0/27 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 0xffff8881030361a8 of 8 bytes by task 6322 on cpu 0:
 __anon_vma_prepare+0x180/0x310 mm/rmap.c:213
 vmf_anon_prepare mm/memory.c:3239 [inline]
 do_anonymous_page mm/memory.c:4451 [inline]
 do_pte_missing mm/memory.c:3895 [inline]
 handle_pte_fault mm/memory.c:5380 [inline]
 __handle_mm_fault mm/memory.c:5523 [inline]
 handle_mm_fault+0x1c03/0x2a80 mm/memory.c:5688
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57
 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline]
 _copy_to_user+0x77/0xa0 lib/usercopy.c:46
 copy_to_user include/linux/uaccess.h:191 [inline]
 do_pipe2+0x8c/0x130 fs/pipe.c:1024
 __do_sys_pipe fs/pipe.c:1045 [inline]
 __se_sys_pipe fs/pipe.c:1043 [inline]
 __x64_sys_pipe+0x21/0x30 fs/pipe.c:1043
 x64_sys_call+0x2ae7/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:23
 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 0xffff8881030361a8 of 8 bytes by task 6321 on cpu 1:
 vmf_anon_prepare mm/memory.c:3231 [inline]
 do_anonymous_page mm/memory.c:4451 [inline]
 do_pte_missing mm/memory.c:3895 [inline]
 handle_pte_fault mm/memory.c:5380 [inline]
 __handle_mm_fault mm/memory.c:5523 [inline]
 handle_mm_fault+0xcf3/0x2a80 mm/memory.c:5688
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:86
 __sys_socketpair+0xba/0x430 net/socket.c:1756
 __do_sys_socketpair net/socket.c:1822 [inline]
 __se_sys_socketpair net/socket.c:1819 [inline]
 __x64_sys_socketpair+0x52/0x60 net/socket.c:1819
 x64_sys_call+0x27a9/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:54
 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

value changed: 0x0000000000000000 -> 0xffff888104121138

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 6321 Comm: syz-executor.0 Not tainted 6.10.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/24 10:15 upstream f2661062f16b edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __anon_vma_prepare / handle_mm_fault
2024/06/23 21:59 upstream 7c16f0a4ed1c edc5149a .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.