[moderation] [bpf?] KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_elem

1 view
Skip to first unread message

syzbot

unread,
May 6, 2024, 3:44:19 AMMay 6
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: dd5a440a31fa Linux 6.9-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16c2b908980000
kernel config: https://syzkaller.appspot.com/x/.config?x=168fab99759dff68
dashboard link: https://syzkaller.appspot.com/bug?extid=ac797dabc281d79ca92b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [and...@kernel.org a...@kernel.org b...@vger.kernel.org dan...@iogearbox.net edd...@gmail.com hao...@google.com john.fa...@gmail.com jo...@kernel.org kps...@kernel.org linux-...@vger.kernel.org marti...@linux.dev s...@google.com so...@kernel.org yongho...@linux.dev]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7f4fef47bdc1/disk-dd5a440a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ddeb59f9b3ab/vmlinux-dd5a440a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d47392e421d9/bzImage-dd5a440a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ac797d...@syzkaller.appspotmail.com

==================================================================
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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jun 10, 2024, 3:44:17 AMJun 10
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages