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: 228d, last: 3d19h
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault (3) mm 6 5 474d 523d 0/29 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 6 3 351d 374d 0/29 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 6 123 581d 721d 0/29 auto-obsoleted due to no activity on 2024/05/31 23:05
upstream KCSAN: data-race in __anon_vma_prepare / handle_mm_fault mm 6 7 1568d 1648d 0/29 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 0xffff88811b46b400 of 8 bytes by task 7649 on cpu 1:
 __anon_vma_prepare+0x172/0x2f0 mm/rmap.c:212
 __vmf_anon_prepare mm/memory.c:3634 [inline]
 vmf_anon_prepare mm/internal.h:432 [inline]
 do_anonymous_page mm/memory.c:5179 [inline]
 do_pte_missing mm/memory.c:4360 [inline]
 handle_pte_fault mm/memory.c:6195 [inline]
 __handle_mm_fault mm/memory.c:6336 [inline]
 handle_mm_fault+0x1d1b/0x2be0 mm/memory.c:6505
 do_user_addr_fault+0x3fe/0x1080 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:618
 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]
 get_random_bytes_user+0x12d/0x290 drivers/char/random.c:473
 __do_sys_getrandom drivers/char/random.c:1416 [inline]
 __se_sys_getrandom drivers/char/random.c:1390 [inline]
 __x64_sys_getrandom+0xcf/0x1a0 drivers/char/random.c:1390
 x64_sys_call+0x1fa6/0x3000 arch/x86/include/generated/asm/syscalls_64.h:319
 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 0xffff88811b46b400 of 8 bytes by task 7648 on cpu 0:
 __vmf_anon_prepare mm/memory.c:3628 [inline]
 vmf_anon_prepare mm/internal.h:432 [inline]
 do_anonymous_page mm/memory.c:5179 [inline]
 do_pte_missing mm/memory.c:4360 [inline]
 handle_pte_fault mm/memory.c:6195 [inline]
 __handle_mm_fault mm/memory.c:6336 [inline]
 handle_mm_fault+0xe8e/0x2be0 mm/memory.c:6505
 do_user_addr_fault+0x630/0x1080 arch/x86/mm/fault.c:1336
 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:618

value changed: 0x0000000000000000 -> 0xffff888104ac31a0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 7648 Comm: syz.5.1394 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/25 16:01 upstream ac3fd01e4c1e 64219f15 .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/10/03 01:31 upstream 7f7072574127 49379ee0 .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/09/17 18:26 upstream 5aca7966d2a7 e2beed91 .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/08/27 16:48 upstream fab1beda7597 e12e5ba4 .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/07/27 15:48 upstream ec2df4364666 fb8f743d .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/07/25 01:39 upstream 94ce1ac2c9b4 fb8f743d .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/07/16 05:47 upstream 155a3c003e55 03fcfc4b .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/07/13 20:25 upstream 5d5d62298b8b 3cda49cf .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/05/24 08:40 upstream 4856ebd99715 ed351ea7 .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/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.