syzbot


KCSAN: data-race in commit_echoes / n_tty_receive_char_special

Status: auto-closed as invalid on 2020/07/21 12:07
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+c79af746fe2d6a49a246@syzkaller.appspotmail.com
First crash: 1640d, last: 1403d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in commit_echoes / n_tty_receive_char_special

write to 0xffffc90005cd9018 of 8 bytes by task 32411 on cpu 1:
 add_echo_byte drivers/tty/n_tty.c:845 [inline]
 echo_char_raw drivers/tty/n_tty.c:923 [inline]
 eraser drivers/tty/n_tty.c:1079 [inline]
 n_tty_receive_char_special+0x116d/0x1bc0 drivers/tty/n_tty.c:1316
 n_tty_receive_buf_fast drivers/tty/n_tty.c:1610 [inline]
 __receive_buf drivers/tty/n_tty.c:1644 [inline]
 n_tty_receive_buf_common+0x17d6/0x1a40 drivers/tty/n_tty.c:1742
 n_tty_receive_buf+0x36/0x50 drivers/tty/n_tty.c:1771
 tiocsti drivers/tty/tty_io.c:2196 [inline]
 tty_ioctl+0xaf4/0xd80 drivers/tty/tty_io.c:2572
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x101/0x150 fs/ioctl.c:763
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x47/0x60 fs/ioctl.c:770
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffc90005cd9018 of 8 bytes by task 11347 on cpu 0:
 commit_echoes+0x51/0x160 drivers/tty/n_tty.c:779
 n_tty_receive_char_fast drivers/tty/n_tty.c:1449 [inline]
 n_tty_receive_buf_fast drivers/tty/n_tty.c:1609 [inline]
 __receive_buf drivers/tty/n_tty.c:1644 [inline]
 n_tty_receive_buf_common+0x16dc/0x1a40 drivers/tty/n_tty.c:1742
 n_tty_receive_buf2+0x39/0x50 drivers/tty/n_tty.c:1777
 tty_ldisc_receive_buf+0x69/0xe0 drivers/tty/tty_buffer.c:461
 tty_port_default_receive_buf+0x82/0xd0 drivers/tty/tty_port.c:38
 receive_buf drivers/tty/tty_buffer.c:481 [inline]
 flush_to_ldisc+0x1dd/0x260 drivers/tty/tty_buffer.c:533
 process_one_work+0x424/0x930 kernel/workqueue.c:2268
 worker_thread+0x9a/0x7e0 kernel/workqueue.c:2414
 kthread+0x203/0x230 kernel/kthread.c:268
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11347 Comm: kworker/u4:5 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
==================================================================

Crashes (91):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/16 12:06 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4ea9d964 .config console log report ci2-upstream-kcsan-gce
2020/06/15 07:08 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2a22c77a .config console log report ci2-upstream-kcsan-gce
2020/06/10 13:25 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 5caaad3a .config console log report ci2-upstream-kcsan-gce
2020/06/08 06:31 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 7751efd0 .config console log report ci2-upstream-kcsan-gce
2020/06/06 16:10 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e6b89e4e .config console log report ci2-upstream-kcsan-gce
2020/06/05 17:21 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d36418e9 .config console log report ci2-upstream-kcsan-gce
2020/06/01 16:46 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a0331e89 .config console log report ci2-upstream-kcsan-gce
2020/05/27 05:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9072c126 .config console log report ci2-upstream-kcsan-gce
2020/05/23 05:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/22 03:51 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/19 14:50 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6d882fd2 .config console log report ci2-upstream-kcsan-gce
2020/05/17 06:40 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 37bccd4e .config console log report ci2-upstream-kcsan-gce
2020/05/14 10:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2d572622 .config console log report ci2-upstream-kcsan-gce
2020/05/11 23:23 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9eb09c40 .config console log report ci2-upstream-kcsan-gce
2020/05/11 09:35 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f8f57555 .config console log report ci2-upstream-kcsan-gce
2020/05/09 21:10 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 88cb3e92 .config console log report ci2-upstream-kcsan-gce
2020/05/09 04:36 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e97b06d3 .config console log report ci2-upstream-kcsan-gce
2020/05/08 07:59 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6c70a1c2 .config console log report ci2-upstream-kcsan-gce
2020/05/06 20:36 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4618eb2d .config console log report ci2-upstream-kcsan-gce
2020/04/29 03:19 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e3ecea2e .config console log report ci2-upstream-kcsan-gce
2020/04/26 10:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 0ce7569e .config console log report ci2-upstream-kcsan-gce
2020/04/26 05:39 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 b8bb8e5f .config console log report ci2-upstream-kcsan-gce
2020/04/16 15:13 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 c743fcb3 .config console log report ci2-upstream-kcsan-gce
2020/04/14 10:22 https://github.com/google/ktsan.git kcsan 40959e34d670 7c54686a .config console log report ci2-upstream-kcsan-gce
2020/04/09 19:10 https://github.com/google/ktsan.git kcsan 40959e34d670 a8c6a3f8 .config console log report ci2-upstream-kcsan-gce
2020/04/08 01:17 https://github.com/google/ktsan.git kcsan 40959e34d670 db9bcd4b .config console log report ci2-upstream-kcsan-gce
2020/04/07 14:12 https://github.com/google/ktsan.git kcsan 40959e34d670 99a96044 .config console log report ci2-upstream-kcsan-gce
2020/03/28 18:59 https://github.com/google/ktsan.git kcsan 40959e34d670 f1ebdfba .config console log report ci2-upstream-kcsan-gce
2020/03/25 08:22 https://github.com/google/ktsan.git kcsan 40959e34d670 41f049cc .config console log report ci2-upstream-kcsan-gce
2020/03/24 01:04 https://github.com/google/ktsan.git kcsan 40959e34d670 84f999d6 .config console log report ci2-upstream-kcsan-gce
2020/03/22 08:46 https://github.com/google/ktsan.git kcsan 40959e34d670 78267cec .config console log report ci2-upstream-kcsan-gce
2020/03/14 22:47 https://github.com/google/ktsan.git kcsan 941e0d917bbf 749688d2 .config console log report ci2-upstream-kcsan-gce
2020/02/25 00:00 https://github.com/google/ktsan.git kcsan 766d004d1b85 59b57593 .config console log report ci2-upstream-kcsan-gce
2020/02/23 23:25 https://github.com/google/ktsan.git kcsan 766d004d1b85 d801cb02 .config console log report ci2-upstream-kcsan-gce
2020/02/23 11:49 https://github.com/google/ktsan.git kcsan 766d004d1b85 2c36e7a7 .config console log report ci2-upstream-kcsan-gce
2020/02/21 21:38 https://github.com/google/ktsan.git kcsan 766d004d1b85 2ffa6679 .config console log report ci2-upstream-kcsan-gce
2020/02/21 04:54 https://github.com/google/ktsan.git kcsan b12d66a6c34f bd2a74a3 .config console log report ci2-upstream-kcsan-gce
2020/02/20 07:55 https://github.com/google/ktsan.git kcsan b12d66a6c34f b690a6e3 .config console log report ci2-upstream-kcsan-gce
2020/02/19 22:09 https://github.com/google/ktsan.git kcsan b12d66a6c34f 47fae6e9 .config console log report ci2-upstream-kcsan-gce
2020/02/19 02:14 https://github.com/google/ktsan.git kcsan b12d66a6c34f 135c18aa .config console log report ci2-upstream-kcsan-gce
2020/02/16 21:15 https://github.com/google/ktsan.git kcsan b12d66a6c34f cf914200 .config console log report ci2-upstream-kcsan-gce
2020/02/12 21:34 https://github.com/google/ktsan.git kcsan f60f0f543333 84f4fc8a .config console log report ci2-upstream-kcsan-gce
2019/11/04 19:19 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/11/03 17:56 https://github.com/google/ktsan.git kcsan 05f2236801fe c9610487 .config console log report ci2-upstream-kcsan-gce
2019/11/02 15:21 https://github.com/google/ktsan.git kcsan 05f2236801fe 997ccc67 .config console log report ci2-upstream-kcsan-gce
2019/10/29 05:57 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/26 12:07 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
2019/10/25 17:25 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
2019/10/25 08:08 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
2019/10/25 07:58 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
2019/10/23 15:30 https://github.com/google/ktsan.git kcsan 05f2236801fe b602d64b .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.