syzbot


KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem

Status: closed as invalid on 2020/06/18 14:24
Subsystems: bpf
[Documentation on labels]
First crash: 1472d, last: 1427d
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 1108d 1209d 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 1335d 1335d 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 733d 816d 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 (3) bpf 1 1263d 1236d 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 865d 899d 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 (8) bpf 1 324d 324d 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 636d 685d 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 0xffff88809fd5d023 of 1 bytes by task 17376 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 htab_lru_map_update_elem+0x4a1/0x680 kernel/bpf/hashtab.c:1061
 bpf_map_update_value.isra.0+0x3bc/0x420 kernel/bpf/syscall.c:203
 generic_map_update_batch+0x273/0x3c0 kernel/bpf/syscall.c:1326
 bpf_map_do_batch+0x194/0x3a0 kernel/bpf/syscall.c:3556
 __do_sys_bpf+0x1cca/0x3100 kernel/bpf/syscall.c:3767
 __se_sys_bpf kernel/bpf/syscall.c:3661 [inline]
 __x64_sys_bpf+0x47/0x60 kernel/bpf/syscall.c:3661
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809fd5d023 of 1 bytes by task 17361 on cpu 1:
 __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+0x6a4/0xa30 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop+0x30/0x70 kernel/bpf/hashtab.c:237
 htab_lru_map_update_elem+0x352/0x680 kernel/bpf/hashtab.c:1043
 bpf_map_update_value.isra.0+0x3bc/0x420 kernel/bpf/syscall.c:203
 generic_map_update_batch+0x273/0x3c0 kernel/bpf/syscall.c:1326
 bpf_map_do_batch+0x194/0x3a0 kernel/bpf/syscall.c:3556
 __do_sys_bpf+0x1cca/0x3100 kernel/bpf/syscall.c:3767
 __se_sys_bpf kernel/bpf/syscall.c:3661 [inline]
 __x64_sys_bpf+0x47/0x60 kernel/bpf/syscall.c:3661
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 17361 Comm: syz-executor.2 Not tainted 5.7.0-rc1-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
2020/05/30 01:43 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 bed08304 .config console log report ci2-upstream-kcsan-gce
2020/05/15 23:38 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d7f9fffa .config console log report ci2-upstream-kcsan-gce
2020/04/14 19:53 https://github.com/google/ktsan.git kcsan 40959e34d670 3f3c5574 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.