syzbot


KCSAN: data-race in echo_char / n_tty_receive_char_special

Status: auto-closed as invalid on 2020/07/23 03:13
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+b79c556c09a8e875d41d@syzkaller.appspotmail.com
First crash: 1645d, last: 1406d

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

write to 0xffffc90001fd9018 of 8 bytes by task 11316 on cpu 0:
 add_echo_byte drivers/tty/n_tty.c:845 [inline]
 echo_char+0x148/0x1b0 drivers/tty/n_tty.c:948
 n_tty_receive_char_fast drivers/tty/n_tty.c:1448 [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+0x16d4/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

read to 0xffffc90001fd9018 of 8 bytes by task 19601 on cpu 1:
 add_echo_byte drivers/tty/n_tty.c:843 [inline]
 echo_char_raw drivers/tty/n_tty.c:923 [inline]
 eraser drivers/tty/n_tty.c:1084 [inline]
 n_tty_receive_char_special+0x1235/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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19601 Comm: syz-executor.1 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (178):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/18 03:12 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d45a4d69 .config console log report ci2-upstream-kcsan-gce
2020/06/17 21:10 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 b6c46f43 .config console log report ci2-upstream-kcsan-gce
2020/06/17 03:12 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 b9f3810b .config console log report ci2-upstream-kcsan-gce
2020/06/16 22:25 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4ea9d964 .config console log report ci2-upstream-kcsan-gce
2020/06/16 00:32 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 baca2611 .config console log report ci2-upstream-kcsan-gce
2020/06/15 10:15 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 8e3ab941 .config console log report ci2-upstream-kcsan-gce
2020/06/14 21:12 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2a22c77a .config console log report ci2-upstream-kcsan-gce
2020/06/14 02:30 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a61674a5 .config console log report ci2-upstream-kcsan-gce
2020/06/13 12:04 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 dbce178a .config console log report ci2-upstream-kcsan-gce
2020/06/13 04:37 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f4724dd3 .config console log report ci2-upstream-kcsan-gce
2020/06/12 16:48 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 3036d6fd .config console log report ci2-upstream-kcsan-gce
2020/06/11 16:29 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 1beaee21 .config console log report ci2-upstream-kcsan-gce
2020/06/10 12:52 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 5caaad3a .config console log report ci2-upstream-kcsan-gce
2020/06/08 21:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 7604bb03 .config console log report ci2-upstream-kcsan-gce
2020/06/07 22:12 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 7751efd0 .config console log report ci2-upstream-kcsan-gce
2020/06/07 09:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2c2b926c .config console log report ci2-upstream-kcsan-gce
2020/06/06 15:40 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e6b89e4e .config console log report ci2-upstream-kcsan-gce
2020/06/05 15:26 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d36418e9 .config console log report ci2-upstream-kcsan-gce
2020/06/04 06:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 b0d1c0d5 .config console log report ci2-upstream-kcsan-gce
2020/06/02 14:43 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 52fd7b7d .config console log report ci2-upstream-kcsan-gce
2020/05/31 15:11 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a0331e89 .config console log report ci2-upstream-kcsan-gce
2020/05/30 03:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 954bd312 .config console log report ci2-upstream-kcsan-gce
2020/05/29 03:14 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d19ed305 .config console log report ci2-upstream-kcsan-gce
2020/05/28 12:23 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 c7192a2f .config console log report ci2-upstream-kcsan-gce
2020/05/26 17:33 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9072c126 .config console log report ci2-upstream-kcsan-gce
2020/05/26 08:48 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 8ca3b7d2 .config console log report ci2-upstream-kcsan-gce
2020/05/25 13:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 73964a9b .config console log report ci2-upstream-kcsan-gce
2020/05/25 01:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 11284182 .config console log report ci2-upstream-kcsan-gce
2020/05/23 23:39 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 96c92ad3 .config console log report ci2-upstream-kcsan-gce
2020/05/22 19:59 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/20 12:50 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 1255f02a .config console log report ci2-upstream-kcsan-gce
2020/05/18 22:51 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 684d3606 .config console log report ci2-upstream-kcsan-gce
2020/05/16 02:42 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 37bccd4e .config console log report ci2-upstream-kcsan-gce
2020/05/15 20:54 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d7f9fffa .config console log report ci2-upstream-kcsan-gce
2020/05/13 10:49 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9a6d42fb .config console log report ci2-upstream-kcsan-gce
2020/05/12 19:35 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a44eb8f7 .config console log report ci2-upstream-kcsan-gce
2020/05/11 07:11 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f8f57555 .config console log report ci2-upstream-kcsan-gce
2020/05/09 18:25 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 88cb3e92 .config console log report ci2-upstream-kcsan-gce
2020/05/09 00:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e97b06d3 .config console log report ci2-upstream-kcsan-gce
2020/05/08 13:06 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 fe4122c3 .config console log report ci2-upstream-kcsan-gce
2020/05/07 10:29 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 98cbd87b .config console log report ci2-upstream-kcsan-gce
2020/05/06 13:28 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4618eb2d .config console log report ci2-upstream-kcsan-gce
2020/05/06 05:22 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 35b8eb30 .config console log report ci2-upstream-kcsan-gce
2020/05/04 22:28 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9941337c .config console log report ci2-upstream-kcsan-gce
2020/05/03 02:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 5457883a .config console log report ci2-upstream-kcsan-gce
2020/05/02 15:55 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 58da4c35 .config console log report ci2-upstream-kcsan-gce
2020/01/15 22:56 https://github.com/google/ktsan.git kcsan 245a43005292 f9b69507 .config console log report ci2-upstream-kcsan-gce
2020/01/13 11:34 https://github.com/google/ktsan.git kcsan 245a43005292 99565c1a .config console log report ci2-upstream-kcsan-gce
2019/10/23 14:24 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.