KCSAN: data-race in bpf_lru_pop_free / bpf_lru_push_free

10 views
Skip to first unread message

syzbot

unread,
Aug 17, 2020, 1:51:22 PM8/17/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9123e3a7 Linux 5.9-rc1
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=142554ce900000
kernel config: https://syzkaller.appspot.com/x/.config?x=809a729b035d082e
dashboard link: https://syzkaller.appspot.com/bug?extid=3536db46dfa58c573458
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)
CC: [and...@fb.com a...@kernel.org b...@vger.kernel.org dan...@iogearbox.net john.fa...@gmail.com ka...@fb.com kps...@chromium.org linux-...@vger.kernel.org net...@vger.kernel.org songliu...@fb.com y...@fb.com]

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

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

==================================================================
BUG: KCSAN: data-race in bpf_lru_pop_free / bpf_lru_push_free

write to 0xffff88807d487222 of 1 bytes by task 28746 on cpu 1:
__bpf_lru_node_move_in kernel/bpf/bpf_lru_list.c:91 [inline]
__local_list_flush kernel/bpf/bpf_lru_list.c:298 [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+0x315/0xeb0 kernel/bpf/bpf_lru_list.c:499
prealloc_lru_pop kernel/bpf/hashtab.c:237 [inline]
htab_lru_map_update_elem+0xb1/0x410 kernel/bpf/hashtab.c:1049
bpf_map_update_value+0x1b4/0x320 kernel/bpf/syscall.c:197
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 0xffff88807d487222 of 1 bytes by task 28751 on cpu 0:
bpf_common_lru_push_free kernel/bpf/bpf_lru_list.c:507 [inline]
bpf_lru_push_free+0xd7/0x590 kernel/bpf/bpf_lru_list.c:555
htab_lru_map_update_elem+0x3e6/0x410 kernel/bpf/hashtab.c:1078
bpf_map_update_value+0x1b4/0x320 kernel/bpf/syscall.c:197
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: 0 PID: 28751 Comm: syz-executor.4 Not tainted 5.9.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
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.
Reply all
Reply to author
Forward
0 new messages