syzbot


KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (5)

Status: moderation: reported on 2023/12/09 00:07
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+3031d0c2cb6c588cfe19@syzkaller.appspotmail.com
First crash: 275d, last: 10d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (2) serial 36 571d 909d 0/26 auto-closed as invalid on 2022/09/11 21:39
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (4) serial 5 331d 422d 0/26 auto-obsoleted due to no activity on 2023/05/10 10:49
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write serial 1 1320d 1320d 0/26 auto-closed as invalid on 2020/08/23 22:27
upstream KCSAN: data-race in n_tty_receive_buf_common / n_tty_write (3) serial 5 485d 527d 0/26 auto-obsoleted due to no activity on 2022/12/07 10:52

Sample crash report:
==================================================================
BUG: KCSAN: data-race in n_tty_receive_buf_common / n_tty_write

write to 0xffffc90003e1f020 of 8 bytes by task 1595 on cpu 0:
 process_echoes drivers/tty/n_tty.c:788 [inline]
 n_tty_write+0x1b9/0xb60 drivers/tty/n_tty.c:2365
 iterate_tty_write drivers/tty/tty_io.c:1021 [inline]
 file_tty_write+0x382/0x680 drivers/tty/tty_io.c:1096
 tty_write+0x28/0x30 drivers/tty/tty_io.c:1117
 do_iter_readv_writev+0x2b0/0x330
 vfs_writev+0x2e9/0x860 fs/read_write.c:971
 do_writev+0xf8/0x220 fs/read_write.c:1018
 __do_sys_writev fs/read_write.c:1091 [inline]
 __se_sys_writev fs/read_write.c:1088 [inline]
 __x64_sys_writev+0x45/0x50 fs/read_write.c:1088
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffc90003e1f020 of 8 bytes by task 27254 on cpu 1:
 flush_echoes drivers/tty/n_tty.c:802 [inline]
 __receive_buf drivers/tty/n_tty.c:1632 [inline]
 n_tty_receive_buf_common+0x87d/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:2633 [inline]
 process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 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: 0x000000000000315f -> 0x0000000000003161

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27254 Comm: kworker/u4:25 Tainted: G        W          6.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events_unbound flush_to_ldisc
==================================================================

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/20 15:58 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2024/02/16 12:54 upstream 4f5e5092fdbf 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2024/01/28 11:49 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2024/01/26 01:47 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2024/01/22 21:31 upstream 6613476e225e 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2024/01/17 02:49 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/12/19 08:56 upstream 2cf4f94d8e86 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/12/11 01:37 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/12/09 08:48 upstream f2e8a57ee903 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/11/25 19:31 upstream b46ae77f6787 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/11/19 17:49 upstream 037266a5f723 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/11/09 00:57 upstream 305230142ae0 b93f63e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/23 17:26 upstream 05d3ef8bba77 989a3687 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/21 23:09 upstream 45d3291c5201 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/19 13:53 upstream dd72f9c7e512 42e1d524 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/19 00:01 upstream dd72f9c7e512 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/15 12:04 upstream 9a3dad63edbe f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/10/13 23:06 upstream 10a6e5feccb8 f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/25 08:00 upstream 8a511e7efc5a 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/23 20:55 upstream d90b0276af8f 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/20 23:23 upstream 5d2f53532ecc 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/16 14:22 upstream 57d88e8a5974 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/10 19:37 upstream 535a265d7f0d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/09/06 22:42 upstream 744a759492b5 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/08/14 20:48 upstream 2ccdd1b13c59 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/07/28 14:50 upstream 57012c57536f 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/07/23 01:27 upstream 295e1388de2d 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/07/09 02:58 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/06/20 07:37 upstream 692b7dc87ca6 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/06/06 12:19 upstream f8dba31b0a82 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
2023/05/31 00:38 upstream afead42fdfca df37c7f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in n_tty_receive_buf_common / n_tty_write
* Struck through repros no longer work on HEAD.