syzbot


KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq (3)

Status: moderation: reported on 2025/05/16 06:14
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+953ec234fc6a0aac85e1@syzkaller.appspotmail.com
First crash: 33d, last: 12d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq (2) serial 3 127d 181d 0/29 auto-obsoleted due to no activity on 2025/04/08 10:28
upstream KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq serial 3 679d 695d 0/29 auto-obsoleted due to no activity on 2023/09/13 05:36

Sample crash report:
IPVS: dh: UDP 224.0.0.2:0 - no destination available
IPVS: dh: UDP 224.0.0.2:0 - no destination available
IPVS: dh: UDP 224.0.0.2:0 - no destination available
==================================================================
BUG: KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq

write to 0xffffffff88eab9d6 of 1 bytes by task 24545 on cpu 1:
 serial8250_do_startup+0x1661/0x1eb0 drivers/tty/serial/8250/8250_port.c:2464
 serial8250_startup+0x41/0x50 drivers/tty/serial/8250/8250_port.c:2486
 uart_port_startup drivers/tty/serial/serial_core.c:323 [inline]
 uart_startup+0x463/0x930 drivers/tty/serial/serial_core.c:367
 uart_port_activate+0x67/0xc0 drivers/tty/serial/serial_core.c:1994
 tty_port_open+0x148/0x1d0 drivers/tty/tty_port.c:784
 uart_open+0x30/0x40 drivers/tty/serial/serial_core.c:1974
 tty_open+0x3d4/0xaf0 drivers/tty/tty_io.c:2146
 chrdev_open+0x2eb/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x649/0xa20 fs/open.c:964
 vfs_open+0x37/0x1e0 fs/open.c:1094
 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: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 0xffffffff88eab9d6 of 1 bytes by interrupt on cpu 0:
 serial8250_handle_irq+0x3f9/0x660 drivers/tty/serial/8250/8250_port.c:1948
 serial8250_default_handle_irq+0x8e/0x120 drivers/tty/serial/8250/8250_port.c:1970
 serial8250_interrupt+0x60/0x110 drivers/tty/serial/8250/8250_core.c:86
 __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+0x188/0x4f0 kernel/irq/chip.c:789
 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+0x60/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
 preempt_count arch/x86/include/asm/preempt.h:27 [inline]
 get_ctx kernel/kcsan/core.c:206 [inline]
 check_access kernel/kcsan/core.c:750 [inline]
 __tsan_unaligned_write4+0xf3/0x190 kernel/kcsan/core.c:1024
 __copy_msghdr net/socket.c:-1 [inline]
 copy_msghdr_from_user net/socket.c:2499 [inline]
 recvmsg_copy_msghdr net/socket.c:2752 [inline]
 ___sys_recvmsg+0x1fe/0x370 net/socket.c:2824
 do_recvmmsg+0x1ef/0x540 net/socket.c:2923
 __sys_recvmmsg net/socket.c:2997 [inline]
 __do_sys_recvmmsg net/socket.c:3020 [inline]
 __se_sys_recvmmsg net/socket.c:3013 [inline]
 __x64_sys_recvmmsg+0xe5/0x170 net/socket.c:3013
 x64_sys_call+0x1c6a/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:300
 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

value changed: 0x00 -> 0x05

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 24538 Comm: syz.9.26040 Not tainted 6.15.0-syzkaller-12426-ge271ed52b344 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================
IPVS: dh: UDP 224.0.0.2:0 - no destination available

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/06 11:23 upstream e271ed52b344 9fa58bba .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq
2025/05/16 06:13 upstream fee3e843b309 cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in serial8250_do_startup / serial8250_handle_irq
* Struck through repros no longer work on HEAD.