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: 962d, last: 914d
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 1385d 1487d 0/28 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 1613d 1613d 0/28 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 1010d 1093d 0/28 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 1704d 1750d 0/28 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 1540d 1513d 0/28 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 1143d 1176d 0/28 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 1 601d 601d 0/28 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.