syzbot


KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (6)

Status: auto-closed as invalid on 2022/06/21 01:00
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 200d, last: 200d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (3) 1 354d 354d 0/24 auto-closed as invalid on 2022/01/17 12:35
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free 1 983d 983d 0/24 auto-closed as invalid on 2020/06/02 14:31
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (4) 1 310d 310d 0/24 auto-closed as invalid on 2022/03/02 08:29
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (5) 2 269d 274d 0/24 auto-closed as invalid on 2022/04/12 08:01
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (7) 14 84d 101d 0/24 auto-obsoleted due to no activity on 2022/10/14 23:50
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (2) 1 819d 819d 0/24 auto-closed as invalid on 2020/10/10 03:00

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free

read to 0xffff88813b0cbee3 of 1 bytes by task 17641 on cpu 1:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:69 [inline]
 __htab_lru_percpu_map_update_elem+0x33d/0x850 kernel/bpf/hashtab.c:1291
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:198
 generic_map_update_batch+0x36e/0x4d0 kernel/bpf/syscall.c:1413
 bpf_map_do_batch+0x35d/0x3c0
 __sys_bpf+0x568/0x600
 __do_sys_bpf kernel/bpf/syscall.c:4767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4765 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4765
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff88813b0cbee3 of 1 bytes by task 17642 on cpu 0:
 __bpf_lru_node_move_in kernel/bpf/bpf_lru_list.c:92 [inline]
 __local_list_flush kernel/bpf/bpf_lru_list.c:300 [inline]
 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:327 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline]
 bpf_lru_pop_free+0x392/0xe90 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline]
 __htab_lru_percpu_map_update_elem+0xe9/0x850 kernel/bpf/hashtab.c:1275
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:198
 generic_map_update_batch+0x36e/0x4d0 kernel/bpf/syscall.c:1413
 bpf_map_do_batch+0x35d/0x3c0
 __sys_bpf+0x568/0x600
 __do_sys_bpf kernel/bpf/syscall.c:4767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4765 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4765
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17642 Comm: syz-executor.3 Not tainted 5.18.0-rc7-syzkaller-dirty #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 2022/05/17 00:54 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free
* Struck through repros no longer work on HEAD.