KCSAN: data-race in n_tty_poll / n_tty_set_termios (5)

Status: moderation: reported C repro on 2026/10/05 08:35
Subsystems: serial
Labels: race:benign prio:low
[Documentation on labels]
Reported-by: syzbot+3a7eb6d437d568d1c34d@syzkaller.appspotmail.com
First crash: 45d, last: 24d
▶ ▼ ✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision
2bb9202d repro-c Reproduced: ✅ ❓ KCSAN: data-race in n_tty_poll / n_tty_set_termios (5) 2026/10/08 02:56 2026/10/08 02:56 2026/10/08 03:10 f8f239cf
22546fc0 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KCSAN: data-race in n_tty_poll / n_tty_set_termios (5) 2026/10/07 00:00 2026/10/07 00:00 2026/10/07 00:33 f7710056
2d4f3971 assessment-kcsan Benign: ✅ ❓ KCSAN: data-race in n_tty_poll / n_tty_set_termios (5) 2026/10/05 08:43 2026/10/05 08:43 2026/10/05 09:28 57bbd979
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
[PATCH] tty: n_tty: Protect poll input checks against termios changes 1 (1) 2026/11/11 08:41
▶ ▼ Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios (4) serial 6 1 777d 777d 0/29 auto-obsoleted due to no activity on 2024/11/06 23:03
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios (2) serial 6 1 1345d 1345d 0/29 auto-obsoleted due to no activity on 2023/04/26 05:55
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios serial 6 1 2269d 2269d 0/29 auto-closed as invalid on 2020/10/07 08:58
upstream KCSAN: data-race in n_tty_poll / n_tty_set_termios (3) serial 6 1 895d 895d 0/29 auto-obsoleted due to no activity on 2024/07/12 11:40
▶ ▼ Last patch testing requests (2)
Created Duration User Patch Repo Result
2026/10/26 17:05 11m retest repro upstream report job log log
2026/10/08 09:23 10m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7b63ef2d55f24519e7e9e5f4d15dbea03f126e40 report job log log

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_poll / n_tty_set_termios

write to 0xffffc90000e6705d of 1 bytes by task 3656 on cpu 0:
 n_tty_set_termios+0x189/0x7a0 drivers/tty/n_tty.c:1791
 tty_set_termios+0x8a2/0x900 drivers/tty/tty_ioctl.c:348
 set_termios+0x373/0x4f0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x37f/0x5b0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x87/0x370 drivers/tty/tty_ioctl.c:982
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2496
 tty_ioctl+0x83e/0xb80 drivers/tty/tty_io.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x239d/0x2550 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc90000e6705d of 1 bytes by task 3657 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1912 [inline]
 n_tty_poll+0x105/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2174
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:877 [inline]
 do_poll fs/select.c:920 [inline]
 do_sys_poll+0x6e1/0xc00 fs/select.c:1015
 __do_sys_poll fs/select.c:1072 [inline]
 __se_sys_poll fs/select.c:1060 [inline]
 __x64_sys_poll+0x12c/0x230 fs/select.c:1060
 x64_sys_call+0x2140/0x2550 arch/x86/include/generated/asm/syscalls_64.h:8
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x30 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3657 Comm: syz-executor656 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
==================================================================
==================================================================
BUG: KCSAN: data-race in n_tty_poll / n_tty_set_termios

write to 0xffffc90000e67010 of 8 bytes by task 3656 on cpu 0:
 n_tty_set_termios+0x159/0x7a0 drivers/tty/n_tty.c:1782
 tty_set_termios+0x8a2/0x900 drivers/tty/tty_ioctl.c:348
 set_termios+0x373/0x4f0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x37f/0x5b0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x87/0x370 drivers/tty/tty_ioctl.c:982
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2496
 tty_ioctl+0x83e/0xb80 drivers/tty/tty_io.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x239d/0x2550 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc90000e67010 of 8 bytes by task 3657 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1913 [inline]
 n_tty_poll+0x154/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2174
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:877 [inline]
 do_poll fs/select.c:920 [inline]
 do_sys_poll+0x6e1/0xc00 fs/select.c:1015
 __do_sys_poll fs/select.c:1072 [inline]
 __se_sys_poll fs/select.c:1060 [inline]
 __x64_sys_poll+0x12c/0x230 fs/select.c:1060
 x64_sys_call+0x2140/0x2550 arch/x86/include/generated/asm/syscalls_64.h:8
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000000000019b -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3657 Comm: syz-executor656 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
==================================================================
==================================================================
BUG: KCSAN: data-race in n_tty_poll / n_tty_set_termios

write to 0xffffc90000e6705d of 1 bytes by task 3656 on cpu 0:
 n_tty_set_termios+0x5d5/0x7a0 drivers/tty/n_tty.c:-1
 tty_set_termios+0x8a2/0x900 drivers/tty/tty_ioctl.c:348
 set_termios+0x373/0x4f0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x37f/0x5b0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x87/0x370 drivers/tty/tty_ioctl.c:982
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2496
 tty_ioctl+0x83e/0xb80 drivers/tty/tty_io.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x239d/0x2550 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc90000e6705d of 1 bytes by task 3657 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1912 [inline]
 n_tty_poll+0x105/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2174
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:877 [inline]
 do_poll fs/select.c:920 [inline]
 do_sys_poll+0x6e1/0xc00 fs/select.c:1015
 __do_sys_poll fs/select.c:1072 [inline]
 __se_sys_poll fs/select.c:1060 [inline]
 __x64_sys_poll+0x12c/0x230 fs/select.c:1060
 x64_sys_call+0x2140/0x2550 arch/x86/include/generated/asm/syscalls_64.h:8
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x30 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3657 Comm: syz-executor656 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
==================================================================
==================================================================
BUG: KCSAN: data-race in n_tty_poll / n_tty_set_termios

write to 0xffffc90000e6705d of 1 bytes by task 3656 on cpu 0:
 n_tty_set_termios+0x189/0x7a0 drivers/tty/n_tty.c:1791
 tty_set_termios+0x8a2/0x900 drivers/tty/tty_ioctl.c:348
 set_termios+0x373/0x4f0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x37f/0x5b0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x87/0x370 drivers/tty/tty_ioctl.c:982
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2496
 tty_ioctl+0x83e/0xb80 drivers/tty/tty_io.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x239d/0x2550 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc90000e6705d of 1 bytes by task 3657 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1912 [inline]
 n_tty_poll+0x105/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2174
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:877 [inline]
 do_poll fs/select.c:920 [inline]
 do_sys_poll+0x6e1/0xc00 fs/select.c:1015
 __do_sys_poll fs/select.c:1072 [inline]
 __se_sys_poll fs/select.c:1060 [inline]
 __x64_sys_poll+0x12c/0x230 fs/select.c:1060
 x64_sys_call+0x2140/0x2550 arch/x86/include/generated/asm/syscalls_64.h:8
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x30 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3657 Comm: syz-executor656 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
==================================================================
==================================================================
BUG: KCSAN: data-race in n_tty_poll / n_tty_set_termios

write to 0xffffc90000e67010 of 8 bytes by task 3656 on cpu 0:
 n_tty_set_termios+0x159/0x7a0 drivers/tty/n_tty.c:1782
 tty_set_termios+0x8a2/0x900 drivers/tty/tty_ioctl.c:348
 set_termios+0x373/0x4f0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x37f/0x5b0 drivers/tty/tty_ioctl.c:-1
 n_tty_ioctl_helper+0x87/0x370 drivers/tty/tty_ioctl.c:982
 n_tty_ioctl+0x101/0x200 drivers/tty/n_tty.c:2496
 tty_ioctl+0x83e/0xb80 drivers/tty/tty_io.c:2791
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x239d/0x2550 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc90000e67010 of 8 bytes by task 3657 on cpu 1:
 input_available_p drivers/tty/n_tty.c:1913 [inline]
 n_tty_poll+0x154/0x450 drivers/tty/n_tty.c:2440
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2174
 vfs_poll include/linux/poll.h:82 [inline]
 do_pollfd fs/select.c:877 [inline]
 do_poll fs/select.c:920 [inline]
 do_sys_poll+0x6e1/0xc00 fs/select.c:1015
 __do_sys_poll fs/select.c:1072 [inline]
 __se_sys_poll fs/select.c:1060 [inline]
 __x64_sys_poll+0x12c/0x230 fs/select.c:1060
 x64_sys_call+0x2140/0x2550 arch/x86/include/generated/asm/syscalls_64.h:8
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000000009b8 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3657 Comm: syz-executor656 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/08 09:34 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7b63ef2d55f2 57bbd979 .config console log report C ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / n_tty_set_termios
2026/10/09 02:34 upstream 6c377d19d4a5 b2734a59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / n_tty_set_termios
2026/10/05 08:35 upstream a90ee4305c4a 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_poll / n_tty_set_termios
* Struck through repros no longer work on HEAD.