syzbot


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

Status: auto-obsoleted due to no activity on 2023/07/12 10:06
Subsystems: bpf
[Documentation on labels]
First crash: 329d, last: 329d
Similar bugs (7)
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) bpf 17 1114d 1215d 0/26 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) bpf 1 1341d 1341d 0/26 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) bpf 23 738d 822d 0/26 auto-closed as invalid on 2022/05/29 15:23
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem bpf 3 1432d 1478d 0/26 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (3) bpf 1 1268d 1241d 0/26 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) bpf 3 871d 904d 0/26 auto-closed as invalid on 2022/01/16 23:04
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (7) bpf 3 642d 690d 0/26 auto-closed as invalid on 2022/09/02 21:44

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

write to 0xffff88815dec3023 of 1 bytes by task 14911 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:71 [inline]
 htab_lru_map_update_elem+0x49a/0x650 kernel/bpf/hashtab.c:1231
 bpf_map_update_value+0x318/0x370 kernel/bpf/syscall.c:230
 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1702
 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4559
 __sys_bpf+0x317/0x800
 __do_sys_bpf kernel/bpf/syscall.c:5162 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5160 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5160
 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 0xffff88815dec3023 of 1 bytes by task 14910 on cpu 1:
 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+0x9a7/0xe20 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:301 [inline]
 htab_lru_map_update_elem+0xb4/0x650 kernel/bpf/hashtab.c:1210
 bpf_map_update_value+0x318/0x370 kernel/bpf/syscall.c:230
 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1702
 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4559
 __sys_bpf+0x317/0x800
 __do_sys_bpf kernel/bpf/syscall.c:5162 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5160 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5160
 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: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14910 Comm: syz-executor.4 Not tainted 6.4.0-rc5-syzkaller-00016-ga4d7d7011219 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/07 10:00 upstream a4d7d7011219 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
* Struck through repros no longer work on HEAD.