syzbot


KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem (4)

Status: auto-closed as invalid on 2022/01/25 13:08
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 355d, last: 346d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem (6) 25 84d 147d 0/24 auto-obsoleted due to no activity on 2022/10/14 12:43
upstream KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem (5) 39 185d 270d 0/24 auto-closed as invalid on 2022/07/05 10:02
upstream KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem (3) 1 713d 713d 0/24 auto-closed as invalid on 2021/01/23 10:19
upstream KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem 3 917d 983d 0/24 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem (2) 11 786d 895d 0/24 auto-closed as invalid on 2020/11/11 15:25

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

write to 0xffff888135c651a3 of 1 bytes by task 16821 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 __htab_lru_percpu_map_update_elem+0x44c/0x7e0 kernel/bpf/hashtab.c:1291
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:196
 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 0xffff888135c651a3 of 1 bytes by task 16825 on cpu 1:
 bpf_lru_node_is_ref kernel/bpf/bpf_lru_list.c:44 [inline]
 __bpf_lru_list_shrink_inactive kernel/bpf/bpf_lru_list.c:218 [inline]
 __bpf_lru_list_shrink+0xc4/0x750 kernel/bpf/bpf_lru_list.c:266
 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:340 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline]
 bpf_lru_pop_free+0x9fa/0xef0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline]
 __htab_lru_percpu_map_update_elem+0xd8/0x7e0 kernel/bpf/hashtab.c:1275
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:196
 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: 1 PID: 16825 Comm: syz-executor.5 Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
==================================================================
BUG: KCSAN: data-race in __htab_lru_percpu_map_update_elem / bpf_lru_pop_free

read to 0xffff888135c651a3 of 1 bytes by task 16821 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:69 [inline]
 __htab_lru_percpu_map_update_elem+0x41d/0x7e0 kernel/bpf/hashtab.c:1291
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:196
 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

write to 0xffff888135c651a3 of 1 bytes by task 16825 on cpu 1:
 __bpf_lru_node_move_in kernel/bpf/bpf_lru_list.c:92 [inline]
 __local_list_flush kernel/bpf/bpf_lru_list.c:300 [inline]
 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:327 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline]
 bpf_lru_pop_free+0x3aa/0xef0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline]
 __htab_lru_percpu_map_update_elem+0xd8/0x7e0 kernel/bpf/hashtab.c:1275
 bpf_percpu_hash_update+0x5a/0x90 kernel/bpf/hashtab.c:2216
 bpf_map_update_value+0x1dd/0x2f0 kernel/bpf/syscall.c:196
 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: 1 PID: 16825 Comm: syz-executor.5 Not tainted 5.16.0-rc6-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/21 12:59 upstream 6e0567b73052 a938f0b8 .config log report info KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem
ci2-upstream-kcsan-gce 2021/12/12 21:07 upstream 90d9fbc16b69 49ca1f59 .config log report info KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem
ci2-upstream-kcsan-gce 2021/12/12 05:49 upstream a763d5a5abd6 49ca1f59 .config log report info KCSAN: data-race in __bpf_lru_list_shrink / __htab_lru_percpu_map_update_elem
* Struck through repros no longer work on HEAD.