syzbot


KCSAN: data-race in copy_page_from_iter_atomic / uprobe_write_opcode

Status: auto-closed as invalid on 2021/10/12 07:12
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 456d, last: 456d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in copy_page_from_iter_atomic / uprobe_write_opcode

read to 0xffff888154e96000 of 1 bytes by task 26650 on cpu 1:
 copy_from_page kernel/events/uprobes.c:247 [inline]
 verify_opcode kernel/events/uprobes.c:272 [inline]
 uprobe_write_opcode+0x13d/0x950 kernel/events/uprobes.c:486
 set_orig_insn+0x2c/0x40
 remove_breakpoint kernel/events/uprobes.c:927 [inline]
 register_for_each_vma+0x7ae/0x890 kernel/events/uprobes.c:1074
 uprobe_apply+0x8b/0x260 kernel/events/uprobes.c:1230
 uprobe_perf_close+0x2f8/0x370 kernel/trace/trace_uprobe.c:1292
 uprobe_perf_open kernel/trace/trace_uprobe.c:1318 [inline]
 trace_uprobe_register+0x310/0x410 kernel/trace/trace_uprobe.c:1468
 perf_trace_event_open kernel/trace/trace_event_perf.c:186 [inline]
 perf_trace_event_init+0xf8/0x790 kernel/trace/trace_event_perf.c:208
 perf_uprobe_init+0xf5/0x140 kernel/trace/trace_event_perf.c:336
 perf_uprobe_event_init+0xde/0x140 kernel/events/core.c:9886
 perf_try_init_event+0x21a/0x400 kernel/events/core.c:11193
 perf_init_event kernel/events/core.c:11257 [inline]
 perf_event_alloc+0xa60/0x1790 kernel/events/core.c:11548
 __do_sys_perf_event_open kernel/events/core.c:12069 [inline]
 __se_sys_perf_event_open+0x5c7/0x27f0 kernel/events/core.c:11961
 __x64_sys_perf_event_open+0x63/0x70 kernel/events/core.c:11961
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff888154e96000 of 16 bytes by task 26652 on cpu 0:
 instrument_copy_from_user include/linux/instrumented.h:136 [inline]
 copyin lib/iov_iter.c:167 [inline]
 copy_page_from_iter_atomic+0x32f/0xba0 lib/iov_iter.c:918
 generic_perform_write+0x1ef/0x3d0 mm/filemap.c:3778
 ext4_buffered_write_iter+0x305/0x400 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11a0
 call_write_iter include/linux/fs.h:2163 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x77d/0x8c0 fs/read_write.c:594
 ksys_write+0xce/0x180 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:656
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26652 Comm: syz-executor.0 Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/07 07:04 upstream 4b93c544e90e 6ca60148 .config log report info KCSAN: data-race in copy_page_from_iter_atomic / uprobe_write_opcode
* Struck through repros no longer work on HEAD.