syzbot


KCSAN: data-race in serial8250_do_startup / serial8250_modem_status

Status: moderation: reported on 2025/06/10 23:33
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+9983c5fd8e6a23d9e22b@syzkaller.appspotmail.com
First crash: 76d, last: 3d16h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in serial8250_do_startup / serial8250_modem_status

write to 0xffffffff88e8dae6 of 1 bytes by task 15522 on cpu 1:
 serial8250_do_startup+0x13de/0x1b10 drivers/tty/serial/8250/8250_port.c:2366
 serial8250_startup+0x41/0x50 drivers/tty/serial/8250/8250_port.c:2388
 uart_port_startup drivers/tty/serial/serial_core.c:324 [inline]
 uart_startup+0x465/0x8e0 drivers/tty/serial/serial_core.c:368
 uart_port_activate+0x67/0xc0 drivers/tty/serial/serial_core.c:1993
 tty_port_open+0x148/0x1d0 drivers/tty/tty_port.c:763
 uart_open+0x30/0x40 drivers/tty/serial/serial_core.c:1973
 tty_open+0x3d4/0xaf0 drivers/tty/tty_io.c:2137
 chrdev_open+0x2e8/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x649/0xa20 fs/open.c:965
 vfs_open+0x37/0x1e0 fs/open.c:1095
 do_open fs/namei.c:3887 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4046
 do_filp_open+0x109/0x230 fs/namei.c:4073
 do_sys_openat2+0xa6/0x110 fs/open.c:1435
 do_sys_open fs/open.c:1450 [inline]
 __do_sys_openat fs/open.c:1466 [inline]
 __se_sys_openat fs/open.c:1461 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1461
 x64_sys_call+0x2e9c/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88e8dae6 of 1 bytes by interrupt on cpu 0:
 serial8250_modem_status+0x6a/0x1e0 drivers/tty/serial/8250/8250_port.c:1749
 serial8250_handle_irq+0x3d6/0x660 drivers/tty/serial/8250/8250_port.c:1833
 serial8250_default_handle_irq+0x8e/0x140 drivers/tty/serial/8250/8250_port.c:1856
 serial8250_interrupt+0x60/0x110 drivers/tty/serial/8250/8250_core.c:82
 __handle_irq_event_percpu+0x90/0x440 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x64/0xf0 kernel/irq/handle.c:210
 handle_edge_irq+0x154/0x470 kernel/irq/chip.c:855
 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
 handle_irq arch/x86/kernel/irq.c:254 [inline]
 call_irq_handler arch/x86/kernel/irq.c:-1 [inline]
 __common_interrupt+0x60/0xb0 arch/x86/kernel/irq.c:325
 common_interrupt+0x7e/0x90 arch/x86/kernel/irq.c:318
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
 clac arch/x86/kernel/signal_64.c:190 [inline]
 x64_setup_rt_frame+0x284/0x580 arch/x86/kernel/signal_64.c:191
 setup_rt_frame arch/x86/kernel/signal.c:250 [inline]
 handle_signal arch/x86/kernel/signal.c:294 [inline]
 arch_do_signal_or_restart+0x27c/0x480 arch/x86/kernel/signal.c:339
 exit_to_user_mode_loop+0x7a/0x100 kernel/entry/common.c:40
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x05

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 15486 Comm: syz.0.3767 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/23 03:58 upstream cf6fc5eefc5b bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_modem_status
2025/08/07 13:56 upstream 6e64f4580381 04cffc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_modem_status
2025/08/06 20:41 upstream 479058002c32 ffe1dd46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_modem_status
2025/06/30 06:37 upstream d0b3b7b22dfa fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_modem_status
2025/06/10 23:32 upstream aef17cb3d3c4 5d7e17ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_modem_status
* Struck through repros no longer work on HEAD.