syzbot


KCSAN: data-race in bpf_percpu_hash_copy / pcpu_copy_value

Status: auto-obsoleted due to no activity on 2023/07/25 14:33
Subsystems: bpf
[Documentation on labels]
First crash: 588d, last: 588d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bpf_percpu_hash_copy / pcpu_copy_value

write to 0xffffe8ffff4557e0 of 8 bytes by task 15880 on cpu 1:
 bpf_long_memcpy include/linux/bpf.h:428 [inline]
 bpf_obj_memcpy include/linux/bpf.h:441 [inline]
 copy_map_value_long include/linux/bpf.h:464 [inline]
 pcpu_copy_value+0x240/0x520 kernel/bpf/hashtab.c:948
 __htab_percpu_map_update_elem+0x265/0x430 kernel/bpf/hashtab.c:1286
 bpf_percpu_hash_update+0x7c/0x90 kernel/bpf/hashtab.c:2375
 bpf_map_update_value+0x2ae/0x370 kernel/bpf/syscall.c:204
 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1702
 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4563
 __sys_bpf+0x317/0x800
 __do_sys_bpf kernel/bpf/syscall.c:5171 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5169 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5169
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffe8ffff4557e0 of 8 bytes by task 15882 on cpu 0:
 bpf_long_memcpy include/linux/bpf.h:428 [inline]
 bpf_obj_memcpy include/linux/bpf.h:441 [inline]
 copy_map_value_long include/linux/bpf.h:464 [inline]
 bpf_percpu_hash_copy+0x386/0x710 kernel/bpf/hashtab.c:2354
 bpf_map_copy_value+0x17e/0x350 kernel/bpf/syscall.c:251
 map_lookup_elem+0x4a0/0x5d0 kernel/bpf/syscall.c:1410
 __sys_bpf+0x3d4/0x800 kernel/bpf/syscall.c:5052
 __do_sys_bpf kernel/bpf/syscall.c:5171 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5169 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5169
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x69efa14bbb218e60 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15882 Comm: syz-executor.4 Not tainted 6.4.0-rc7-syzkaller-00014-g692b7dc87ca6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/20 14:31 upstream 692b7dc87ca6 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bpf_percpu_hash_copy / pcpu_copy_value
* Struck through repros no longer work on HEAD.