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
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 388d, last: 355d
similar bugs (6):
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) 17 598d 699d 0/24 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) 1 825d 825d 0/24 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) 23 222d 306d 0/24 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 917d 962d 0/24 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (3) 1 752d 725d 0/24 auto-closed as invalid on 2020/12/21 11:59
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (7) 3 126d 174d 0/24 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):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/12 23:00 upstream 90d9fbc16b69 49ca1f59 .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
ci2-upstream-kcsan-gce 2021/11/10 18:12 upstream 89d714ab6043 75b04091 .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
ci2-upstream-kcsan-gce 2021/11/09 14:03 upstream d2f38a3c6507 59bcaf9a .config log report info KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem
* Struck through repros no longer work on HEAD.