syzbot


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

Status: auto-closed as invalid on 2020/12/21 11:59
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+11b79051c3362faa4ea0@syzkaller.appspotmail.com
First crash: 1471d, last: 1471d
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 1317d 1418d 0/28 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 1544d 1544d 0/28 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 941d 1025d 0/28 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 1636d 1681d 0/28 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_map_update_elem (5) bpf 3 1074d 1107d 0/28 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 532d 532d 0/28 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 845d 893d 0/28 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 0xffff888021a7b8cb of 1 bytes by task 23435 on cpu 0:
 bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline]
 htab_lru_map_update_elem+0x370/0x430 kernel/bpf/hashtab.c:1067
 bpf_map_update_value+0x1bc/0x330 kernel/bpf/syscall.c:201
 generic_map_update_batch+0x344/0x450 kernel/bpf/syscall.c:1347
 bpf_map_do_batch+0x2a8/0x310 kernel/bpf/syscall.c:4007
 __do_sys_bpf+0x8a3/0x9aa0 kernel/bpf/syscall.c:4463
 __se_sys_bpf kernel/bpf/syscall.c:4357 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4357
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888021a7b8cb of 1 bytes by task 23436 on cpu 1:
 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+0xb49/0xea0 kernel/bpf/bpf_lru_list.c:499
 prealloc_lru_pop kernel/bpf/hashtab.c:238 [inline]
 htab_lru_map_update_elem+0xb1/0x430 kernel/bpf/hashtab.c:1049
 bpf_map_update_value+0x1bc/0x330 kernel/bpf/syscall.c:201
 generic_map_update_batch+0x344/0x450 kernel/bpf/syscall.c:1347
 bpf_map_do_batch+0x2a8/0x310 kernel/bpf/syscall.c:4007
 __do_sys_bpf+0x8a3/0x9aa0 kernel/bpf/syscall.c:4463
 __se_sys_bpf kernel/bpf/syscall.c:4357 [inline]
 __x64_sys_bpf+0x3d/0x50 kernel/bpf/syscall.c:4357
 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: 23436 Comm: syz-executor.2 Not tainted 5.10.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/10 13:13 upstream 407ab579637c cca87986 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.