syzbot


KCSAN: data-race in yama_ptracer_del / yama_ptracer_del

Status: auto-closed as invalid on 2020/07/20 03:04
Subsystems: lsm
[Documentation on labels]
Reported-by: syzbot+988639b5572640b8736e@syzkaller.appspotmail.com
First crash: 1646d, last: 1411d

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

write to 0xffff88809cc656d0 of 1 bytes by interrupt on cpu 0:
 yama_ptracer_del+0x117/0x1a0 security/yama/yama_lsm.c:191
 yama_task_free+0x1e/0x30 security/yama/yama_lsm.c:207
 security_task_free+0x3f/0xa0 security/security.c:1569
 __put_task_struct+0xc3/0x350 kernel/fork.c:748
 put_task_struct include/linux/sched/task.h:126 [inline]
 delayed_put_task_struct+0x19b/0x1c0 kernel/exit.c:173
 rcu_do_batch kernel/rcu/tree.c:2206 [inline]
 rcu_core+0x533/0x9f0 kernel/rcu/tree.c:2433
 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2442
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xb5/0xd0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:546 [inline]
 smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1140
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 __read_once_size include/linux/compiler.h:232 [inline]
 check_kcov_mode kernel/kcov.c:155 [inline]
 __sanitizer_cov_trace_pc+0x22/0x50 kernel/kcov.c:187
 __read_once_size+0x11/0xd0 include/linux/compiler.h:232
 compound_head include/linux/page-flags.h:182 [inline]
 PageActive include/linux/page-flags.h:329 [inline]
 mark_page_accessed+0x1e4/0x4f0 mm/swap.c:385
 touch_buffer fs/buffer.c:63 [inline]
 __find_get_block+0x239/0x7e0 fs/buffer.c:1334
 sb_find_get_block include/linux/buffer_head.h:338 [inline]
 recently_deleted fs/ext4/ialloc.c:682 [inline]
 find_inode_bit.isra.0+0x16d/0x330 fs/ext4/ialloc.c:724
 __ext4_new_inode+0xd7b/0x3020 fs/ext4/ialloc.c:927
 ext4_symlink+0x322/0x9e0 fs/ext4/namei.c:3295
 vfs_symlink fs/namei.c:3937 [inline]
 vfs_symlink+0x216/0x330 fs/namei.c:3923
 do_symlinkat+0x1ac/0x1e0 fs/namei.c:3964
 __do_sys_symlink fs/namei.c:3983 [inline]
 __se_sys_symlink fs/namei.c:3981 [inline]
 __x64_sys_symlink+0x3c/0x50 fs/namei.c:3981
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809cc656d0 of 1 bytes by interrupt on cpu 1:
 yama_ptracer_del+0xd4/0x1a0 security/yama/yama_lsm.c:187
 yama_task_free+0x1e/0x30 security/yama/yama_lsm.c:207
 security_task_free+0x3f/0xa0 security/security.c:1569
 __put_task_struct+0xc3/0x350 kernel/fork.c:748
 put_task_struct include/linux/sched/task.h:126 [inline]
 delayed_put_task_struct+0x19b/0x1c0 kernel/exit.c:173
 rcu_do_batch kernel/rcu/tree.c:2206 [inline]
 rcu_core+0x533/0x9f0 kernel/rcu/tree.c:2433
 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2442
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xb5/0xd0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:546 [inline]
 smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1140
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 __sanitizer_cov_trace_pc+0x0/0x50 kernel/kcov.c:915
 tomoyo_domain_quota_is_ok+0x223/0x2b0 security/tomoyo/util.c:1071
 tomoyo_supervisor+0x1d9/0xc90 security/tomoyo/common.c:2089
 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
 tomoyo_path_permission security/tomoyo/file.c:587 [inline]
 tomoyo_path_permission+0x118/0x150 security/tomoyo/file.c:573
 tomoyo_path_perm+0x292/0x350 security/tomoyo/file.c:838
 tomoyo_path_symlink+0x66/0x90 security/tomoyo/tomoyo.c:206
 security_path_symlink+0xa7/0xe0 security/security.c:1104
 do_symlinkat+0xcd/0x1e0 fs/namei.c:3962
 __do_sys_symlink fs/namei.c:3983 [inline]
 __se_sys_symlink fs/namei.c:3981 [inline]
 __x64_sys_symlink+0x3c/0x50 fs/namei.c:3981
 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: 31374 Comm: syz-executor.3 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (103):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/15 03:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2a22c77a .config console log report ci2-upstream-kcsan-gce
2020/06/14 03:04 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a61674a5 .config console log report ci2-upstream-kcsan-gce
2020/06/05 22:17 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d36418e9 .config console log report ci2-upstream-kcsan-gce
2020/06/02 02:22 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a0331e89 .config console log report ci2-upstream-kcsan-gce
2020/05/14 12:09 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2d572622 .config console log report ci2-upstream-kcsan-gce
2020/05/14 08:22 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a885920d .config console log report ci2-upstream-kcsan-gce
2020/05/13 20:32 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 9a6d42fb .config console log report ci2-upstream-kcsan-gce
2020/05/09 02:01 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e97b06d3 .config console log report ci2-upstream-kcsan-gce
2020/05/08 15:14 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 fe4122c3 .config console log report ci2-upstream-kcsan-gce
2020/05/06 01:15 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 35b8eb30 .config console log report ci2-upstream-kcsan-gce
2020/05/03 12:28 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 58ae5e18 .config console log report ci2-upstream-kcsan-gce
2020/05/01 04:51 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 3698959a .config console log report ci2-upstream-kcsan-gce
2020/04/30 02:49 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2dd552a5 .config console log report ci2-upstream-kcsan-gce
2020/04/26 03:18 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 b8bb8e5f .config console log report ci2-upstream-kcsan-gce
2020/04/19 16:20 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6dfd45e1 .config console log report ci2-upstream-kcsan-gce
2020/04/09 02:45 https://github.com/google/ktsan.git kcsan 40959e34d670 a8c6a3f8 .config console log report ci2-upstream-kcsan-gce
2020/04/07 11:20 https://github.com/google/ktsan.git kcsan 40959e34d670 99a96044 .config console log report ci2-upstream-kcsan-gce
2020/03/28 04:49 https://github.com/google/ktsan.git kcsan 40959e34d670 831e9a81 .config console log report ci2-upstream-kcsan-gce
2020/03/26 21:15 https://github.com/google/ktsan.git kcsan 40959e34d670 6d25c5a0 .config console log report ci2-upstream-kcsan-gce
2020/03/25 12:49 https://github.com/google/ktsan.git kcsan 40959e34d670 41f049cc .config console log report ci2-upstream-kcsan-gce
2020/03/19 13:29 https://github.com/google/ktsan.git kcsan 40959e34d670 2c31c529 .config console log report ci2-upstream-kcsan-gce
2020/03/18 11:51 https://github.com/google/ktsan.git kcsan 941e0d917bbf 0a96a13c .config console log report ci2-upstream-kcsan-gce
2020/03/09 20:54 https://github.com/google/ktsan.git kcsan 941e0d917bbf 35f53e45 .config console log report ci2-upstream-kcsan-gce
2020/03/04 17:29 https://github.com/google/ktsan.git kcsan 766d004d1b85 712198ac .config console log report ci2-upstream-kcsan-gce
2020/02/26 18:37 https://github.com/google/ktsan.git kcsan 766d004d1b85 251aabb7 .config console log report ci2-upstream-kcsan-gce
2020/02/26 09:29 https://github.com/google/ktsan.git kcsan 766d004d1b85 4f588111 .config console log report ci2-upstream-kcsan-gce
2020/02/25 05:07 https://github.com/google/ktsan.git kcsan 766d004d1b85 59b57593 .config console log report ci2-upstream-kcsan-gce
2020/02/24 15:20 https://github.com/google/ktsan.git kcsan 766d004d1b85 1253d6f0 .config console log report ci2-upstream-kcsan-gce
2020/02/22 22:48 https://github.com/google/ktsan.git kcsan 766d004d1b85 2c36e7a7 .config console log report ci2-upstream-kcsan-gce
2020/02/22 07:54 https://github.com/google/ktsan.git kcsan 766d004d1b85 2ffa6679 .config console log report ci2-upstream-kcsan-gce
2020/02/20 13:54 https://github.com/google/ktsan.git kcsan b12d66a6c34f 81230308 .config console log report ci2-upstream-kcsan-gce
2020/02/17 03:34 https://github.com/google/ktsan.git kcsan b12d66a6c34f 1f448cd6 .config console log report ci2-upstream-kcsan-gce
2020/02/14 03:45 https://github.com/google/ktsan.git kcsan b12d66a6c34f 5d7b90f1 .config console log report ci2-upstream-kcsan-gce
2020/02/12 19:25 https://github.com/google/ktsan.git kcsan f60f0f543333 84f4fc8a .config console log report ci2-upstream-kcsan-gce
2020/02/11 11:18 https://github.com/google/ktsan.git kcsan f60f0f543333 084454ae .config console log report ci2-upstream-kcsan-gce
2020/02/09 16:41 https://github.com/google/ktsan.git kcsan f60f0f543333 6ece2ea5 .config console log report ci2-upstream-kcsan-gce
2020/02/07 05:17 https://github.com/google/ktsan.git kcsan 245a43005292 06150bf1 .config console log report ci2-upstream-kcsan-gce
2020/02/06 16:32 https://github.com/google/ktsan.git kcsan 245a43005292 5be3a391 .config console log report ci2-upstream-kcsan-gce
2020/02/05 15:16 https://github.com/google/ktsan.git kcsan 245a43005292 662cf49a .config console log report ci2-upstream-kcsan-gce
2020/02/04 16:08 https://github.com/google/ktsan.git kcsan 245a43005292 93e5e335 .config console log report ci2-upstream-kcsan-gce
2020/02/02 04:26 https://github.com/google/ktsan.git kcsan 245a43005292 2274ad39 .config console log report ci2-upstream-kcsan-gce
2020/01/29 20:20 https://github.com/google/ktsan.git kcsan 245a43005292 5ed23f9a .config console log report ci2-upstream-kcsan-gce
2020/01/29 03:35 https://github.com/google/ktsan.git kcsan 245a43005292 c8e81ce4 .config console log report ci2-upstream-kcsan-gce
2020/01/16 16:40 https://github.com/google/ktsan.git kcsan 245a43005292 3de7aabb .config console log report ci2-upstream-kcsan-gce
2020/01/14 14:17 https://github.com/google/ktsan.git kcsan 245a43005292 32881205 .config console log report ci2-upstream-kcsan-gce
2019/10/24 03:23 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.