syzbot


KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem

Status: auto-closed as invalid on 2020/11/11 05:04
Subsystems: bpf
[Documentation on labels]
First crash: 1548d, last: 1467d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (2) bpf 2 1363d 1390d 0/28 auto-closed as invalid on 2021/02/23 14:15
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (3) bpf 91 680d 1036d 0/28 auto-obsoleted due to no activity on 2023/01/14 15:11
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (4) bpf 1 611d 611d 0/28 auto-obsoleted due to no activity on 2023/03/24 04:11
upstream KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (5) bpf 13 475d 537d 23/28 fixed on 2023/09/28 17:51

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem

write to 0xffff888109073f23 of 1 bytes by task 12705 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 __htab_lru_percpu_map_update_elem+0x6ea/0xa30 kernel/bpf/hashtab.c:1180
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:1902
 bpf_map_update_value+0x1d8/0x320 kernel/bpf/syscall.c:172
 generic_map_update_batch+0x336/0x450 kernel/bpf/syscall.c:1342
 bpf_map_do_batch+0x286/0x2f0 kernel/bpf/syscall.c:3870
 __do_sys_bpf+0xb2a/0x9a60 kernel/bpf/syscall.c:4242
 __se_sys_bpf kernel/bpf/syscall.c:4136 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4136
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888109073f23 of 1 bytes by task 12699 on cpu 1:
 bpf_lru_node_is_ref kernel/bpf/bpf_lru_list.c:44 [inline]
 __bpf_lru_list_rotate_active kernel/bpf/bpf_lru_list.c:148 [inline]
 __bpf_lru_list_rotate+0xce/0x7b0 kernel/bpf/bpf_lru_list.c:240
 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:329 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline]
 bpf_lru_pop_free+0x7b7/0xeb0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:237 [inline]
 __htab_lru_percpu_map_update_elem+0xd0/0xa30 kernel/bpf/hashtab.c:1166
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:1902
 bpf_map_update_value+0x1d8/0x320 kernel/bpf/syscall.c:172
 generic_map_update_batch+0x336/0x450 kernel/bpf/syscall.c:1342
 bpf_map_do_batch+0x286/0x2f0 kernel/bpf/syscall.c:3870
 __do_sys_bpf+0xb2a/0x9a60 kernel/bpf/syscall.c:4242
 __se_sys_bpf kernel/bpf/syscall.c:4136 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4136
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12699 Comm: syz-executor.3 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/07 04:55 upstream c85fb28b6f99 1880b4a9 .config console log report info ci2-upstream-kcsan-gce
2020/10/03 13:27 upstream d3d45f8220d6 2653fa43 .config console log report info ci2-upstream-kcsan-gce
2020/09/29 10:43 upstream fb0155a09b02 1b88c6d5 .config console log report info ci2-upstream-kcsan-gce
2020/09/28 17:34 upstream a1b8638ba132 6bfdbe89 .config console log report info ci2-upstream-kcsan-gce
2020/09/08 06:12 upstream f4d51dffc6c0 abf9ba4f .config console log report ci2-upstream-kcsan-gce
2020/09/06 09:04 upstream 9322c47b21b9 abf9ba4f .config console log report ci2-upstream-kcsan-gce
2020/09/04 23:07 upstream c70672d8d316 abf9ba4f .config console log report ci2-upstream-kcsan-gce
2020/08/03 05:40 upstream 142c3326b055 96dd3623 .config console log report ci2-upstream-kcsan-gce
2020/08/03 05:32 upstream 142c3326b055 96dd3623 .config console log report ci2-upstream-kcsan-gce
2020/07/23 14:32 upstream d15be546031c 340ea530 .config console log report ci2-upstream-kcsan-gce
2020/07/20 17:40 upstream 5714ee50bb43 8caeeeb7 .config console log report ci2-upstream-kcsan-gce
2020/07/17 23:49 upstream 8882572675c1 9c812472 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.