syzbot


KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (7)

Status: auto-closed as invalid on 2022/09/02 21:44
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 174d, last: 126d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (4) 17 598d 699d 0/24 auto-closed as invalid on 2021/05/19 00:13
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (2) 1 825d 825d 0/24 auto-closed as invalid on 2020/10/03 19:18
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (6) 23 222d 306d 0/24 auto-closed as invalid on 2022/05/29 15:23
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem 3 917d 962d 0/24 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (3) 1 753d 726d 0/24 auto-closed as invalid on 2020/12/21 11:59
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (5) 3 355d 388d 0/24 auto-closed as invalid on 2022/01/16 23:04

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

write to 0xffff888106be78b3 of 1 bytes by task 21075 on cpu 1:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:71 [inline]
 htab_lru_map_update_elem+0x48a/0x870 kernel/bpf/hashtab.c:1195
 bpf_map_update_value+0x1b9/0x2f0 kernel/bpf/syscall.c:226
 generic_map_update_batch+0x36e/0x4d0 kernel/bpf/syscall.c:1637
 bpf_map_do_batch+0x373/0x3d0
 __sys_bpf+0x5b7/0x630
 __do_sys_bpf kernel/bpf/syscall.c:5021 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5019 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:5019
 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+0x63/0xcd

read to 0xffff888106be78b3 of 1 bytes by task 21068 on cpu 0:
 bpf_lru_node_is_ref kernel/bpf/bpf_lru_list.c:44 [inline]
 __local_list_pop_pending kernel/bpf/bpf_lru_list.c:384 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:476 [inline]
 bpf_lru_pop_free+0xa19/0xe90 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:310 [inline]
 htab_lru_map_update_elem+0xb7/0x870 kernel/bpf/hashtab.c:1174
 bpf_map_update_value+0x1b9/0x2f0 kernel/bpf/syscall.c:226
 generic_map_update_batch+0x36e/0x4d0 kernel/bpf/syscall.c:1637
 bpf_map_do_batch+0x373/0x3d0
 __sys_bpf+0x5b7/0x630
 __do_sys_bpf kernel/bpf/syscall.c:5021 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5019 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:5019
 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+0x63/0xcd

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21068 Comm: syz-executor.3 Not tainted 5.19.0-rc8-syzkaller-00105-g6e2c0490769e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/29 21:41 upstream 6e2c0490769e fef302b1 .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
ci2-upstream-kcsan-gce 2022/07/01 18:18 upstream a175eca0f3d7 1434eec0 .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
ci2-upstream-kcsan-gce 2022/06/11 14:10 upstream 0885eacdc81f 0d5abf15 .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
* Struck through repros no longer work on HEAD.