[moderation] [fs?] KCSAN: data-race in __perf_event_overflow / fasync_remove_entry (3)

0 views
Skip to first unread message

syzbot

unread,
May 31, 2024, 9:23:29 PMMay 31
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d8ec19857b09 Merge tag 'net-6.10-rc2' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=104775d6980000
kernel config: https://syzkaller.appspot.com/x/.config?x=b639694183430f97
dashboard link: https://syzkaller.appspot.com/bug?extid=dd48357de58aaffad087
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [alex....@gmail.com bra...@kernel.org chuck...@oracle.com ja...@suse.cz jla...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4c525cb10506/disk-d8ec1985.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5d3c75ffceb2/vmlinux-d8ec1985.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5a992c1884ee/bzImage-d8ec1985.xz

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

==================================================================
BUG: KCSAN: data-race in __perf_event_overflow / fasync_remove_entry

write to 0xffff888116950b60 of 8 bytes by task 389 on cpu 1:
fasync_remove_entry+0xd2/0x130 fs/fcntl.c:909
fasync_helper+0x96/0xc0 fs/fcntl.c:1008
perf_fasync+0x64/0x90 kernel/events/core.c:6679
__fput+0x5fa/0x660 fs/file_table.c:419
__fput_sync+0x44/0x60 fs/file_table.c:507
__do_sys_close fs/open.c:1555 [inline]
__se_sys_close+0x101/0x1b0 fs/open.c:1540
__x64_sys_close+0x1f/0x30 fs/open.c:1540
x64_sys_call+0x25f1/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:4
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888116950b60 of 8 bytes by interrupt on cpu 0:
__perf_event_overflow+0x44a/0x570 kernel/events/core.c:9726
perf_swevent_hrtimer+0x240/0x2f0 kernel/events/core.c:11079
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x20d/0x5e0 kernel/time/hrtimer.c:1751
hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1813
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
__preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline]
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0x3d/0x60 kernel/locking/spinlock.c:194
class_raw_spinlock_irqsave_destructor include/linux/spinlock.h:553 [inline]
try_to_wake_up+0x3e5/0x630 kernel/sched/core.c:4262
wake_up_process kernel/sched/core.c:4510 [inline]
wake_up_q+0x3f/0x80 kernel/sched/core.c:1029
futex_wake+0x2d2/0x330 kernel/futex/waitwake.c:199
do_futex+0x2ab/0x370 kernel/futex/syscalls.c:107
__do_sys_futex kernel/futex/syscalls.c:179 [inline]
__se_sys_futex+0x25d/0x3a0 kernel/futex/syscalls.c:160
__x64_sys_futex+0x78/0x90 kernel/futex/syscalls.c:160
x64_sys_call+0x28c1/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:203
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888117f90ed0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 390 Comm: syz-executor.0 Not tainted 6.10.0-rc1-syzkaller-00104-gd8ec19857b09 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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
Reply all
Reply to author
Forward
0 new messages