[moderation] [kernel?] KCSAN: data-race in wq_worker_tick / wq_worker_tick

3 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 5:03:27 AM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e8f60209d6cf Merge tag 'pmdomain-v6.7-rc2' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1272a8bae80000
kernel config: https://syzkaller.appspot.com/x/.config?x=585869067cd7ce59
dashboard link: https://syzkaller.appspot.com/bug?extid=1f9c6a9361cf67ffc0d9
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [fred...@kernel.org linux-...@vger.kernel.org mi...@kernel.org tg...@linutronix.de]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d70d3690767e/disk-e8f60209.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7602f84ba538/vmlinux-e8f60209.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e9fe9a5875ca/bzImage-e8f60209.xz

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

==================================================================
BUG: KCSAN: data-race in wq_worker_tick / wq_worker_tick

read-write to 0xffff888100066ea8 of 8 bytes by interrupt on cpu 1:
wq_worker_tick+0x66/0x3c0 kernel/workqueue.c:1333
scheduler_tick+0x13e/0x1d0 kernel/sched/core.c:5666
update_process_times+0xf5/0x110 kernel/time/timer.c:2076
tick_sched_handle kernel/time/tick-sched.c:255 [inline]
tick_nohz_highres_handler+0x244/0x2c0 kernel/time/tick-sched.c:1516
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
__sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
sysvec_apic_timer_interrupt+0x68/0x80 arch/x86/kernel/apic/apic.c:1076
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
check_access kernel/kcsan/core.c:747 [inline]
__tsan_read8+0xb3/0x180 kernel/kcsan/core.c:1025
__process_echoes+0x27/0x6a0 drivers/tty/n_tty.c:698
flush_echoes drivers/tty/n_tty.c:807 [inline]
__receive_buf drivers/tty/n_tty.c:1632 [inline]
n_tty_receive_buf_common+0x8e6/0xbc0 drivers/tty/n_tty.c:1729
n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1775
tty_ldisc_receive_buf+0x60/0xe0 drivers/tty/tty_buffer.c:386
tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37
receive_buf drivers/tty/tty_buffer.c:444 [inline]
flush_to_ldisc+0x1ca/0x400 drivers/tty/tty_buffer.c:494
process_one_work kernel/workqueue.c:2630 [inline]
process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
worker_thread+0x525/0x730 kernel/workqueue.c:2784
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read-write to 0xffff888100066ea8 of 8 bytes by interrupt on cpu 0:
wq_worker_tick+0x66/0x3c0 kernel/workqueue.c:1333
scheduler_tick+0x13e/0x1d0 kernel/sched/core.c:5666
update_process_times+0xf5/0x110 kernel/time/timer.c:2076
tick_sched_handle kernel/time/tick-sched.c:255 [inline]
tick_nohz_highres_handler+0x244/0x2c0 kernel/time/tick-sched.c:1516
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
__sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
sysvec_apic_timer_interrupt+0x68/0x80 arch/x86/kernel/apic/apic.c:1076
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
__sanitizer_cov_trace_pc+0x0/0x60
n_tty_receive_buf_common+0x20e/0xbc0 drivers/tty/n_tty.c:1717
n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1775
tty_ldisc_receive_buf+0x60/0xe0 drivers/tty/tty_buffer.c:386
tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37
receive_buf drivers/tty/tty_buffer.c:444 [inline]
flush_to_ldisc+0x1ca/0x400 drivers/tty/tty_buffer.c:494
process_one_work kernel/workqueue.c:2630 [inline]
process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
worker_thread+0x525/0x730 kernel/workqueue.c:2784
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0x0000000003922770 -> 0x0000000003924e80

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21713 Comm: kworker/u4:41 Not tainted 6.7.0-rc3-syzkaller-00048-ge8f60209d6cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: events_unbound flush_to_ldisc
==================================================================


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