syzbot


KCSAN: data-race in echo_char / n_tty_receive_buf_common

Status: auto-closed as invalid on 2020/06/18 13:11
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+e518b0df8f4e19495d3e@syzkaller.appspotmail.com
First crash: 1644d, last: 1455d
Discussions (1)
Title Replies (including bot) Last reply
KCSAN: data-race in echo_char / n_tty_receive_buf_common 2 (3) 2019/11/04 13:26

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

write to 0xffffc90000deb018 of 8 bytes by task 14868 on cpu 0:
 add_echo_byte drivers/tty/n_tty.c:845 [inline]
 echo_char+0x148/0x1b0 drivers/tty/n_tty.c:948
 eraser drivers/tty/n_tty.c:1043 [inline]
 n_tty_receive_char_special+0x155c/0x1bc0 drivers/tty/n_tty.c:1316
 n_tty_receive_buf_standard drivers/tty/n_tty.c:1584 [inline]
 __receive_buf drivers/tty/n_tty.c:1646 [inline]
 n_tty_receive_buf_common+0x790/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 0xffffc90000deb018 of 8 bytes by task 21 on cpu 1:
 add_echo_byte drivers/tty/n_tty.c:845 [inline]
 echo_char_raw drivers/tty/n_tty.c:923 [inline]
 finish_erasing drivers/tty/n_tty.c:961 [inline]
 finish_erasing drivers/tty/n_tty.c:958 [inline]
 n_tty_receive_char_inline drivers/tty/n_tty.c:1416 [inline]
 n_tty_receive_buf_standard drivers/tty/n_tty.c:1583 [inline]
 __receive_buf drivers/tty/n_tty.c:1646 [inline]
 n_tty_receive_buf_common+0x4b8/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: 1 PID: 21 Comm: kworker/u4:1 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 (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/29 10:40 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 ba2806db .config console log report ci2-upstream-kcsan-gce
2020/03/11 14:43 https://github.com/google/ktsan.git kcsan 941e0d917bbf e103bc9e .config console log report ci2-upstream-kcsan-gce
2020/02/16 14:22 https://github.com/google/ktsan.git kcsan b12d66a6c34f cf914200 .config console log report ci2-upstream-kcsan-gce
2020/01/22 19:52 https://github.com/google/ktsan.git kcsan 245a43005292 3334d684 .config console log report ci2-upstream-kcsan-gce
2020/01/06 20:25 https://github.com/google/ktsan.git kcsan 245a43005292 53430d97 .config console log report ci2-upstream-kcsan-gce
2019/12/30 19:44 https://github.com/google/ktsan.git kcsan 245a43005292 6b36d338 .config console log report ci2-upstream-kcsan-gce
2019/12/16 12:04 https://github.com/google/ktsan.git kcsan 245a43005292 0ae38e44 .config console log report ci2-upstream-kcsan-gce
2019/12/07 21:36 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1508f453 .config console log report ci2-upstream-kcsan-gce
2019/12/02 19:09 https://github.com/google/ktsan.git kcsan ef798c30ba4e ab342da3 .config console log report ci2-upstream-kcsan-gce
2019/11/05 14:55 https://github.com/google/ktsan.git kcsan 94c006602e13 af5c522d .config console log report ci2-upstream-kcsan-gce
2019/11/04 15:59 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/10/29 04:50 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/23 05:54 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.