syzbot


KCSAN: data-race in kobject_put / kobject_uevent_env

Status: auto-obsoleted due to no activity on 2024/06/05 16:52
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+8c52032b484b510c8b5b@syzkaller.appspotmail.com
First crash: 43d, last: 43d

Sample crash report:
llcp: llcp_sock_recvmsg: Recv datagram failed state 3 -6 0
==================================================================
BUG: KCSAN: data-race in kobject_put / kobject_uevent_env

read-write to 0xffff888101070854 of 1 bytes by task 1621 on cpu 0:
 kobject_uevent_env+0x4e/0x550 lib/kobject_uevent.c:476
 kobject_uevent+0x1c/0x30 lib/kobject_uevent.c:641
 device_del+0x729/0x7b0 drivers/base/core.c:3927
 nfc_unregister_device+0x114/0x130 net/nfc/core.c:1183
 nci_unregister_device+0x14c/0x160 net/nfc/nci/core.c:1312
 virtual_ncidev_close+0x30/0x50 drivers/nfc/virtual_ncidev.c:168
 __fput+0x2c1/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888101070854 of 1 bytes by task 1617 on cpu 1:
 kobject_put+0x25/0x180 lib/kobject.c:733
 put_device+0x1f/0x30 drivers/base/core.c:3828
 nfc_put_device net/nfc/nfc.h:103 [inline]
 nfc_llcp_local_put+0x87/0xb0 net/nfc/llcp_core.c:196
 nfc_llcp_sock_free net/nfc/llcp_sock.c:1021 [inline]
 llcp_sock_destruct+0x14d/0x1a0 net/nfc/llcp_sock.c:966
 __sk_destruct+0x3d/0x440 net/core/sock.c:2175
 sk_destruct net/core/sock.c:2223 [inline]
 __sk_free+0x284/0x2d0 net/core/sock.c:2234
 sk_free+0x39/0x70 net/core/sock.c:2245
 sock_put include/net/sock.h:1950 [inline]
 llcp_sock_release+0x38f/0x3d0 net/nfc/llcp_sock.c:646
 __sock_release net/socket.c:659 [inline]
 sock_close+0x68/0x150 net/socket.c:1421
 __fput+0x2c1/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x07 -> 0x0d

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1617 Comm: syz-executor.1 Tainted: G        W          6.9.0-rc6-syzkaller-00046-g18daea77cca6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/01 16:51 upstream 18daea77cca6 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in kobject_put / kobject_uevent_env
* Struck through repros no longer work on HEAD.