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: 23d, last: 4d01h

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

write to 0xffffffff88eb0ae6 of 1 bytes by task 10161 on cpu 1:
 serial8250_do_startup+0x165e/0x1eb0 drivers/tty/serial/8250/8250_port.c:2460
 serial8250_startup+0x41/0x50 drivers/tty/serial/8250/8250_port.c:2482
 uart_port_startup drivers/tty/serial/serial_core.c:324 [inline]
 uart_startup+0x468/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:764
 uart_open+0x30/0x40 drivers/tty/serial/serial_core.c:1973
 tty_open+0x3d1/0xaf0 drivers/tty/tty_io.c:2137
 chrdev_open+0x2eb/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x646/0xa20 fs/open.c:964
 vfs_open+0x37/0x1e0 fs/open.c:1094
 do_open fs/namei.c:3896 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4055
 do_filp_open+0x109/0x230 fs/namei.c:4082
 do_sys_openat2+0xa6/0x110 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_openat fs/open.c:1468 [inline]
 __se_sys_openat fs/open.c:1463 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1463
 x64_sys_call+0x1af/0x2fb0 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 0xffffffff88eb0ae6 of 1 bytes by interrupt on cpu 0:
 serial8250_modem_status+0x6a/0x1e0 drivers/tty/serial/8250/8250_port.c:1859
 serial8250_handle_irq+0x3d6/0x660 drivers/tty/serial/8250/8250_port.c:1943
 serial8250_default_handle_irq+0x8e/0x120 drivers/tty/serial/8250/8250_port.c:1966
 serial8250_interrupt+0x60/0x110 drivers/tty/serial/8250/8250_core.c:86
 __handle_irq_event_percpu+0x93/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+0x188/0x4f0 kernel/irq/chip.c:797
 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:266 [inline]
 __common_interrupt+0x63/0x100 arch/x86/kernel/irq.c:292
 common_interrupt+0x7e/0x90 arch/x86/kernel/irq.c:285
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
 kcsan_setup_watchpoint+0x415/0x430 kernel/kcsan/core.c:705
 pgd_offset_pgd include/linux/pgtable.h:161 [inline]
 follow_page_mask mm/gup.c:1078 [inline]
 __get_user_pages+0x46e/0x1fb0 mm/gup.c:1486
 __get_user_pages_locked mm/gup.c:1754 [inline]
 get_dump_page+0xb5/0x250 mm/gup.c:2258
 dump_user_range+0x14a/0x8c0 fs/coredump.c:1180
 elf_core_dump+0x1dc2/0x1f80 fs/binfmt_elf.c:2075
 do_coredump+0x1dfd/0x27b0 fs/coredump.c:950
 get_signal+0xd85/0xf70 kernel/signal.c:3019
 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
 irqentry_exit_to_user_mode+0x5e/0xa0 kernel/entry/common.c:184
 irqentry_exit+0x12/0x50 kernel/entry/common.c:287
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x00 -> 0x05

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 10155 Comm: syz.1.1990 Tainted: G        W           6.16.0-rc4-syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.