KCSAN: data-race in yama_ptracer_del / yama_ptracer_del

6 views
Skip to first unread message

syzbot

unread,
Jan 18, 2020, 9:27:09 AM1/18/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 245a4300 Merge branch 'rcu/kcsan' into tip/locking/kcsan
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=15ff4669e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4b9db179318d21f
dashboard link: https://syzkaller.appspot.com/bug?extid=988639b5572640b8736e
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [jmo...@namei.org kees...@chromium.org linux-...@vger.kernel.org linux-secu...@vger.kernel.org se...@hallyn.com el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+988639...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in yama_ptracer_del / yama_ptracer_del

read to 0xffff8880a0f65c10 of 1 bytes by interrupt on cpu 0:
yama_ptracer_del+0xd6/0x1a0 security/yama/yama_lsm.c:187
yama_task_free+0x22/0x30 security/yama/yama_lsm.c:207
security_task_free+0x43/0xa0 security/security.c:1518
__put_task_struct+0xcd/0x360 kernel/fork.c:745
put_task_struct include/linux/sched/task.h:122 [inline]
delayed_put_task_struct+0x1a5/0x1d0 kernel/exit.c:182
__rcu_reclaim kernel/rcu/rcu.h:222 [inline]
rcu_do_batch+0x256/0x5b0 kernel/rcu/tree.c:2183
rcu_core+0x365/0x4c0 kernel/rcu/tree.c:2408
rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2417
__do_softirq+0x115/0x33f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0xbb/0xe0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
__sanitizer_cov_trace_const_cmp1+0x0/0x20 kernel/kcov.c:255
snprintf+0x6f/0xa0 lib/vsprintf.c:2707
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0x372/0x10d0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x290/0xd20 security/tomoyo/common.c:2095
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_permission+0x121/0x160 security/tomoyo/file.c:573
tomoyo_path_perm+0x2c6/0x390 security/tomoyo/file.c:838
tomoyo_path_symlink+0x69/0xa0 security/tomoyo/tomoyo.c:206
security_path_symlink+0xab/0xe0 security/security.c:1053
do_symlinkat+0xcd/0x1e0 fs/namei.c:4156
__do_sys_symlink fs/namei.c:4177 [inline]
__se_sys_symlink fs/namei.c:4175 [inline]
__x64_sys_symlink+0x3f/0x50 fs/namei.c:4175
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8880a0f65c10 of 1 bytes by interrupt on cpu 1:
yama_ptracer_del+0x119/0x1a0 security/yama/yama_lsm.c:191
yama_task_free+0x22/0x30 security/yama/yama_lsm.c:207
security_task_free+0x43/0xa0 security/security.c:1518
__put_task_struct+0xcd/0x360 kernel/fork.c:745
put_task_struct include/linux/sched/task.h:122 [inline]
delayed_put_task_struct+0x1a5/0x1d0 kernel/exit.c:182
__rcu_reclaim kernel/rcu/rcu.h:222 [inline]
rcu_do_batch+0x256/0x5b0 kernel/rcu/tree.c:2183
rcu_core+0x365/0x4c0 kernel/rcu/tree.c:2408
rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2417
__do_softirq+0x115/0x33f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0xbb/0xe0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
get_current arch/x86/include/asm/current.h:15 [inline]
__sanitizer_cov_trace_pc+0xd/0x50 kernel/kcov.c:186
tomoyo_domain_quota_is_ok+0x220/0x2b0 security/tomoyo/util.c:1069
tomoyo_supervisor+0x22b/0xd20 security/tomoyo/common.c:2087
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_permission+0x121/0x160 security/tomoyo/file.c:573
tomoyo_check_open_permission+0x2fd/0x320 security/tomoyo/file.c:777
tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline]
tomoyo_file_open+0x75/0x90 security/tomoyo/tomoyo.c:314
security_file_open+0x69/0x210 security/security.c:1497
do_dentry_open+0x211/0x970 fs/open.c:784
vfs_open+0x62/0x80 fs/open.c:914
do_last fs/namei.c:3420 [inline]
path_openat+0xf9f/0x3580 fs/namei.c:3537
do_filp_open+0x11e/0x1b0 fs/namei.c:3567
do_sys_open+0x3b3/0x4f0 fs/open.c:1097
__do_sys_open fs/open.c:1115 [inline]
__se_sys_open fs/open.c:1110 [inline]
__x64_sys_open+0x55/0x70 fs/open.c:1110
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7993 Comm: udevd Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 19, 2020, 11:04:11 PM7/19/20
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages