KCSAN: data-race in yama_relation_cleanup / yama_task_free (3)

8 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 7:03:11 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d5beb314 Merge tag 'hyperv-fixes-signed' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11d65231500000
kernel config: https://syzkaller.appspot.com/x/.config?x=cf114765a0c30afa
dashboard link: https://syzkaller.appspot.com/bug?extid=5f3dcb2d7c7b062f7bae
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
CC: [jmo...@namei.org kees...@chromium.org linux-...@vger.kernel.org linux-secu...@vger.kernel.org se...@hallyn.com]

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

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

==================================================================
BUG: KCSAN: data-race in yama_relation_cleanup / yama_task_free

write to 0xffff888020742fd0 of 1 bytes by interrupt on cpu 1:
yama_ptracer_del security/yama/yama_lsm.c:191 [inline]
yama_task_free+0xc3/0x160 security/yama/yama_lsm.c:207
security_task_free+0x3f/0xa0 security/security.c:1596
__put_task_struct+0xc2/0x3a0 kernel/fork.c:735
put_task_struct include/linux/sched/task.h:113 [inline]
delayed_put_task_struct+0x4e/0x130 kernel/exit.c:172
rcu_do_batch kernel/rcu/tree.c:2476 [inline]
rcu_core+0x6bb/0xbc0 kernel/rcu/tree.c:2711
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2724
__do_softirq+0x12c/0x2b1 kernel/softirq.c:298
asm_call_irq_on_stack+0xf/0x20
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu+0xb2/0xc0 kernel/softirq.c:423
sysvec_apic_timer_interrupt+0x74/0x90 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
atomic64_read include/asm-generic/atomic-instrumented.h:838 [inline]
atomic_long_read include/asm-generic/atomic-long.h:29 [inline]
find_watchpoint kernel/kcsan/core.c:123 [inline]
check_access kernel/kcsan/core.c:616 [inline]
__tsan_read1+0x20/0x180 kernel/kcsan/core.c:839
tomoyo_check_acl+0xad/0x200 security/tomoyo/domain.c:173
tomoyo_path_permission security/tomoyo/file.c:586 [inline]
tomoyo_check_open_permission+0x17f/0x370 security/tomoyo/file.c:777
tomoyo_file_open+0xd3/0xf0 security/tomoyo/tomoyo.c:313
security_file_open+0x3f/0x90 security/security.c:1575
do_dentry_open+0x22d/0x870 fs/open.c:804
vfs_open+0x43/0x50 fs/open.c:931
do_open fs/namei.c:3252 [inline]
path_openat+0x1844/0x20a0 fs/namei.c:3369
do_filp_open+0xbd/0x1d0 fs/namei.c:3396
do_sys_openat2+0xa3/0x240 fs/open.c:1168
do_sys_open fs/open.c:1184 [inline]
__do_sys_open fs/open.c:1192 [inline]
__se_sys_open fs/open.c:1188 [inline]
__x64_sys_open+0xe2/0x110 fs/open.c:1188
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888020742fd0 of 1 bytes by task 9676 on cpu 0:
yama_relation_cleanup+0x69/0x150 security/yama/yama_lsm.c:122
process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
worker_thread+0x635/0xb90 kernel/workqueue.c:2418
kthread+0x1fd/0x220 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9676 Comm: kworker/0:4 Not tainted 5.10.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events yama_relation_cleanup
==================================================================


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 2, 2021, 12:29:09 AM3/2/21
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