syzbot


KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_elem

Status: auto-obsoleted due to no activity on 2024/06/10 07:44
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+ac797dabc281d79ca92b@syzkaller.appspotmail.com
First crash: 133d, last: 133d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_elem (2) bpf 1 54d 54d 0/28 auto-obsoleted due to no activity on 2024/08/28 12:16

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_elem

write to 0xffff88810118d428 of 4 bytes by task 17596 on cpu 0:
 __local_list_add_pending kernel/bpf/bpf_lru_list.c:358 [inline]
 bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:457 [inline]
 bpf_lru_pop_free+0xc72/0xd50 kernel/bpf/bpf_lru_list.c:504
 prealloc_lru_pop kernel/bpf/hashtab.c:305 [inline]
 __htab_lru_percpu_map_update_elem+0xfe/0x630 kernel/bpf/hashtab.c:1352
 bpf_percpu_hash_update+0x5e/0xa0 kernel/bpf/hashtab.c:2392
 bpf_map_update_value+0x2b1/0x350 kernel/bpf/syscall.c:181
 map_update_elem+0x430/0x4d0 kernel/bpf/syscall.c:1641
 __sys_bpf+0x713/0x7a0 kernel/bpf/syscall.c:5648
 __do_sys_bpf kernel/bpf/syscall.c:5767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5765 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5765
 x64_sys_call+0x86c/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:322
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810118d428 of 4 bytes by task 17597 on cpu 1:
 lookup_nulls_elem_raw kernel/bpf/hashtab.c:661 [inline]
 __htab_map_lookup_elem kernel/bpf/hashtab.c:691 [inline]
 htab_lru_percpu_map_lookup_elem+0xb8/0x1c0 kernel/bpf/hashtab.c:2326
 ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
 bpf_map_lookup_elem+0x35/0x50 kernel/bpf/helpers.c:38
 ___bpf_prog_run+0x9ab/0x46c0 kernel/bpf/core.c:1997
 __bpf_prog_run32+0x74/0xa0 kernel/bpf/core.c:2236
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run2+0x97/0x150 kernel/trace/bpf_trace.c:2420
 __bpf_trace_sys_enter+0x9/0x10 include/trace/events/syscalls.h:18
 trace_sys_enter+0x65/0xa0 include/trace/events/syscalls.h:18
 syscall_trace_enter+0x13f/0x1f0 kernel/entry/common.c:61
 syscall_enter_from_user_mode_work include/linux/entry-common.h:168 [inline]
 syscall_enter_from_user_mode include/linux/entry-common.h:198 [inline]
 do_syscall_64+0xaa/0x1d0 arch/x86/entry/common.c:79
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x99e6fbbc -> 0xea0222e5

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 17597 Comm: modprobe Not tainted 6.9.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/06 07:43 upstream dd5a440a31fa 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_elem
* Struck through repros no longer work on HEAD.