syzbot


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

Status: auto-closed as invalid on 2022/01/17 12:35
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 350d, last: 350d
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 1 979d 979d 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 (6) 1 195d 195d 0/24 auto-closed as invalid on 2022/06/21 01:00
upstream KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free (4) 1 306d 306d 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 265d 269d 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 79d 96d 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 814d 814d 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 0xffff88812cf08e23 of 1 bytes by task 6527 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:69 [inline]
 __htab_lru_percpu_map_update_elem+0x41d/0x7e0 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:196
 generic_map_update_batch+0x364/0x4c0 kernel/bpf/syscall.c:1409
 bpf_map_do_batch+0x33e/0x3a0
 __sys_bpf+0x9ae/0xa3c0
 __do_sys_bpf kernel/bpf/syscall.c:4737 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4735 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4735
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff88812cf08e23 of 1 bytes by task 6515 on cpu 1:
 __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+0x3aa/0xef0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline]
 __htab_lru_percpu_map_update_elem+0xd8/0x7e0 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:196
 generic_map_update_batch+0x364/0x4c0 kernel/bpf/syscall.c:1409
 bpf_map_do_batch+0x33e/0x3a0
 __sys_bpf+0x9ae/0xa3c0
 __do_sys_bpf kernel/bpf/syscall.c:4737 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4735 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4735
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 6515 Comm: syz-executor.3 Not tainted 5.16.0-rc5-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/12/13 12:30 upstream 2585cf9dfaad 0304899b .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.