syzbot


KCSAN: data-race in __synchronize_hardirq / handle_irq_event

Status: closed as invalid on 2020/06/18 14:24
Subsystems: kernel
[Documentation on labels]
First crash: 2076d, last: 1909d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __synchronize_hardirq / handle_irq_event

write to 0xffff88812bca0600 of 4 bytes by interrupt on cpu 1:
 irqd_clear kernel/irq/internals.h:225 [inline]
 handle_irq_event+0xa7/0xbe kernel/irq/handle.c:216
 handle_edge_irq+0x170/0x460 kernel/irq/chip.c:830
 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline]
 do_IRQ+0x76/0x120 arch/x86/kernel/irq.c:250
 ret_from_intr+0x0/0x21
 arch_local_irq_restore arch/x86/include/asm/paravirt.h:759 [inline]
 kcsan_setup_watchpoint+0x25a/0x440 kernel/kcsan/core.c:542
 tomoyo_path_matches_pattern+0x27/0x140 security/tomoyo/util.c:918
 tomoyo_compare_name_union security/tomoyo/file.c:87 [inline]
 tomoyo_compare_name_union+0x6b/0x90 security/tomoyo/file.c:82
 tomoyo_check_path_acl security/tomoyo/file.c:260 [inline]
 tomoyo_check_path_acl+0x7d/0xa0 security/tomoyo/file.c:252
 tomoyo_check_acl+0xf8/0x280 security/tomoyo/domain.c:175
 tomoyo_path_permission security/tomoyo/file.c:586 [inline]
 tomoyo_path_permission+0xda/0x150 security/tomoyo/file.c:573
 tomoyo_check_open_permission+0x273/0x2d0 security/tomoyo/file.c:780
 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline]
 tomoyo_file_open+0x6c/0x90 security/tomoyo/tomoyo.c:314
 security_file_open+0x64/0x280 security/security.c:1548
 do_dentry_open+0x212/0x970 fs/open.c:784
 vfs_open+0x62/0x80 fs/open.c:911
 do_open fs/namei.c:3229 [inline]
 path_openat+0x1ff4/0x23d0 fs/namei.c:3346
 do_filp_open+0x11e/0x1b0 fs/namei.c:3373
 do_sys_openat2+0x52e/0x680 fs/open.c:1148
 do_sys_open+0xa2/0x110 fs/open.c:1164
 ksys_open include/linux/syscalls.h:1386 [inline]
 __do_sys_open fs/open.c:1170 [inline]
 __se_sys_open fs/open.c:1168 [inline]
 __x64_sys_open+0x50/0x60 fs/open.c:1168
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88812bca0600 of 4 bytes by task 13129 on cpu 0:
 irqd_irq_inprogress include/linux/irq.h:341 [inline]
 __synchronize_hardirq+0x62/0x1e0 kernel/irq/manage.c:51
 synchronize_irq+0x4a/0x120 kernel/irq/manage.c:132
 serial8250_do_shutdown+0xb3/0x3b0 drivers/tty/serial/8250/8250_port.c:2440
 serial8250_shutdown+0x49/0x60 drivers/tty/serial/8250/8250_port.c:2486
 uart_port_shutdown+0x6b/0x90 drivers/tty/serial/serial_core.c:1706
 uart_tty_port_shutdown+0x7b/0x160 drivers/tty/serial/serial_core.c:1578
 tty_port_shutdown+0x13f/0x160 drivers/tty/tty_port.c:330
 tty_port_close drivers/tty/tty_port.c:636 [inline]
 tty_port_close+0x79/0xe0 drivers/tty/tty_port.c:631
 uart_close+0x55/0x110 drivers/tty/serial/serial_core.c:1559
 tty_release+0x281/0x8e0 drivers/tty/tty_io.c:1679
 __fput+0x1e9/0x500 fs/file_table.c:280
 ____fput+0x1b/0x30 fs/file_table.c:313
 task_work_run+0xba/0x120 kernel/task_work.c:123
 get_signal+0x1236/0x1290 kernel/signal.c:2533
 do_signal+0x2b/0x840 arch/x86/kernel/signal.c:784
 exit_to_usermode_loop+0x24a/0x2c0 arch/x86/entry/common.c:161
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x38b/0x3b0 arch/x86/entry/common.c:305
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (24):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/10 08:08 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 860c4de9 .config console log report ci2-upstream-kcsan-gce
2020/05/29 18:29 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 bed08304 .config console log report ci2-upstream-kcsan-gce
2020/05/24 11:37 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 96c92ad3 .config console log report ci2-upstream-kcsan-gce
2020/05/23 20:35 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/22 14:39 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/14 11:49 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2d572622 .config console log report ci2-upstream-kcsan-gce
2020/05/11 17:57 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f8f57555 .config console log report ci2-upstream-kcsan-gce
2020/05/11 04:08 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 8742a2b9 .config console log report ci2-upstream-kcsan-gce
2020/05/06 14:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4618eb2d .config console log report ci2-upstream-kcsan-gce
2020/05/06 09:35 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 35b8eb30 .config console log report ci2-upstream-kcsan-gce
2020/04/20 02:32 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9f7c6d12 .config console log report ci2-upstream-kcsan-gce
2020/04/18 22:28 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 365fba24 .config console log report ci2-upstream-kcsan-gce
2020/03/02 06:13 https://github.com/google/ktsan.git kcsan 766d004d1b85 4a4e0509 .config console log report ci2-upstream-kcsan-gce
2020/02/25 01:27 https://github.com/google/ktsan.git kcsan 766d004d1b85 59b57593 .config console log report ci2-upstream-kcsan-gce
2020/02/24 12:46 https://github.com/google/ktsan.git kcsan 766d004d1b85 1253d6f0 .config console log report ci2-upstream-kcsan-gce
2020/02/24 04:20 https://github.com/google/ktsan.git kcsan 766d004d1b85 d801cb02 .config console log report ci2-upstream-kcsan-gce
2020/02/12 00:02 https://github.com/google/ktsan.git kcsan f60f0f543333 4d1ab643 .config console log report ci2-upstream-kcsan-gce
2020/02/08 17:06 https://github.com/google/ktsan.git kcsan f60f0f543333 06150bf1 .config console log report ci2-upstream-kcsan-gce
2020/02/05 06:45 https://github.com/google/ktsan.git kcsan 245a43005292 93e5e335 .config console log report ci2-upstream-kcsan-gce
2020/01/28 06:01 https://github.com/google/ktsan.git kcsan 245a43005292 56cd6c9b .config console log report ci2-upstream-kcsan-gce
2020/01/26 20:35 https://github.com/google/ktsan.git kcsan 245a43005292 dd56146d .config console log report ci2-upstream-kcsan-gce
2020/01/14 19:44 https://github.com/google/ktsan.git kcsan 245a43005292 fa12bd3c .config console log report ci2-upstream-kcsan-gce
2020/01/13 13:53 https://github.com/google/ktsan.git kcsan 245a43005292 99565c1a .config console log report ci2-upstream-kcsan-gce
2019/12/26 02:54 https://github.com/google/ktsan.git kcsan 245a43005292 be5c2c81 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.