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
Subsystems: bpf
[Documentation on labels]
First crash: 1155d, last: 1106d
Similar bugs (7)
Kernel Title Rank 🛈 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 6 17 1578d 1679d 0/29 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 6 1 1806d 1806d 0/29 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 6 23 1203d 1286d 0/29 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 6 3 1897d 1943d 0/29 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 6 1 1733d 1706d 0/29 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 6 3 1335d 1369d 0/29 auto-closed as invalid on 2022/01/16 23:04
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (8) bpf 6 1 794d 794d 0/29 auto-obsoleted due to no activity on 2023/07/12 10:06

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):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/29 21:41 upstream 6e2c0490769e fef302b1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
2022/07/01 18:18 upstream a175eca0f3d7 1434eec0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
2022/06/11 14:10 upstream 0885eacdc81f 0d5abf15 .config console log report info 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.