syzbot


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

Status: auto-closed as invalid on 2022/01/16 23:04
Subsystems: bpf
[Documentation on labels]
First crash: 897d, last: 864d
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 1107d 1208d 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 1334d 1334d 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 731d 815d 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 1426d 1471d 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 1261d 1235d 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 (8) bpf 1 323d 323d 0/26 auto-obsoleted due to no activity on 2023/07/12 10:06
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (7) bpf 3 635d 683d 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 0xffff888137958223 of 1 bytes by task 4555 on cpu 1:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 htab_lru_map_update_elem+0x440/0x730 kernel/bpf/hashtab.c:1172
 bpf_map_update_value+0x1b9/0x2f0 kernel/bpf/syscall.c:222
 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

read to 0xffff888137958223 of 1 bytes by task 4545 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+0xb79/0xef0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline]
 htab_lru_map_update_elem+0xb4/0x730 kernel/bpf/hashtab.c:1151
 bpf_map_update_value+0x1b9/0x2f0 kernel/bpf/syscall.c:222
 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: 0 PID: 4545 Comm: syz-executor.4 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/12 23:00 upstream 90d9fbc16b69 49ca1f59 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
2021/11/10 18:12 upstream 89d714ab6043 75b04091 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
2021/11/09 14:03 upstream d2f38a3c6507 59bcaf9a .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.