syzbot


KCSAN: data-race in exec_mmap / vms_clear_ptes

Status: upstream: reported on 2024/09/30 07:39
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+d207c41e97001109b49d@syzkaller.appspotmail.com
First crash: 6d06h, last: 5d19h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KCSAN: data-race in exec_mmap / vms_clear_ptes 1 (2) 2024/09/30 17:47

Sample crash report:
==================================================================
BUG: KCSAN: data-race in exec_mmap / vms_clear_ptes

write to 0xffff888102fbaae8 of 8 bytes by task 3004 on cpu 1:
 update_hiwater_rss include/linux/mm.h:2655 [inline]
 vms_clear_ptes+0x1a7/0x300 mm/vma.c:1088
 vms_complete_munmap_vmas+0x170/0x480 mm/vma.c:1140
 do_vmi_align_munmap+0x349/0x390 mm/vma.c:1349
 do_vmi_munmap+0x1eb/0x230 mm/vma.c:1397
 __vm_munmap+0xfd/0x220 mm/mmap.c:1600
 __do_sys_munmap mm/mmap.c:1617 [inline]
 __se_sys_munmap mm/mmap.c:1614 [inline]
 __x64_sys_munmap+0x36/0x40 mm/mmap.c:1614
 x64_sys_call+0xd32/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:12
 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 0xffff888102fbaae8 of 8 bytes by task 5494 on cpu 0:
 get_mm_hiwater_rss include/linux/mm.h:2642 [inline]
 setmax_mm_hiwater_rss include/linux/mm.h:2672 [inline]
 exec_mmap+0x2d0/0x440 fs/exec.c:1012
 begin_new_exec+0xaf9/0x10b0 fs/exec.c:1280
 load_elf_binary+0x63b/0x19e0 fs/binfmt_elf.c:996
 search_binary_handler fs/exec.c:1752 [inline]
 exec_binprm fs/exec.c:1794 [inline]
 bprm_execve+0x4e6/0xc30 fs/exec.c:1845
 do_execveat_common+0x793/0x800 fs/exec.c:1952
 do_execve fs/exec.c:2026 [inline]
 __do_sys_execve fs/exec.c:2102 [inline]
 __se_sys_execve fs/exec.c:2097 [inline]
 __x64_sys_execve+0x5a/0x70 fs/exec.c:2097
 x64_sys_call+0x1277/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:60
 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: 0x000000000000022b -> 0x000000000000024b

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5494 Comm: dhcpcd Not tainted 6.11.0-syzkaller-12113-ge7ed34365879 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/29 23:18 upstream e7ed34365879 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in exec_mmap / vms_clear_ptes
2024/09/29 12:21 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in exec_mmap / vms_clear_ptes
* Struck through repros no longer work on HEAD.