[moderation] [mm?] KCSAN: data-race in fill_mg_cmtime / shmem_mknod

3 views
Skip to first unread message

syzbot

unread,
Nov 20, 2024, 11:18:27 AM11/20/24
Hello,

syzbot found the following issue on:

HEAD commit: bf9aa14fc523 Merge tag 'timers-core-2024-11-18' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17414ae8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4239a0e02e161ec
dashboard link: https://syzkaller.appspot.com/bug?extid=9195e9356af82aebbf9f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [[email protected] [email protected] [email protected] [email protected]]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5889d7019bad/disk-bf9aa14f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8d0c07d02151/vmlinux-bf9aa14f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/bafa60632b80/bzImage-bf9aa14f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

==================================================================
BUG: KCSAN: data-race in fill_mg_cmtime / shmem_mknod

write to 0xffff888104812c8c of 4 bytes by task 3541 on cpu 1:
inode_set_mtime_to_ts include/linux/fs.h:1648 [inline]
shmem_mknod+0x136/0x180 mm/shmem.c:3641
shmem_create+0x34/0x40 mm/shmem.c:3700
lookup_open fs/namei.c:3649 [inline]
open_last_lookups fs/namei.c:3748 [inline]
path_openat+0xe92/0x1fa0 fs/namei.c:3984
do_filp_open+0x107/0x230 fs/namei.c:4014
do_sys_openat2+0xab/0x120 fs/open.c:1398
do_sys_open fs/open.c:1413 [inline]
__do_sys_openat fs/open.c:1429 [inline]
__se_sys_openat fs/open.c:1424 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1424
x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888104812c8c of 4 bytes by task 8827 on cpu 0:
inode_get_mtime_nsec include/linux/fs.h:1634 [inline]
inode_get_mtime include/linux/fs.h:1640 [inline]
fill_mg_cmtime+0x58/0x280 fs/stat.c:55
generic_fillattr+0x241/0x330 fs/stat.c:99
shmem_getattr+0x17b/0x200 mm/shmem.c:1174
vfs_getattr_nosec fs/stat.c:208 [inline]
vfs_getattr fs/stat.c:246 [inline]
vfs_statx_path+0x171/0x2d0 fs/stat.c:283
vfs_statx+0xe1/0x170 fs/stat.c:347
vfs_fstatat fs/stat.c:366 [inline]
__do_sys_newfstatat fs/stat.c:530 [inline]
__se_sys_newfstatat+0xdc/0x300 fs/stat.c:524
__x64_sys_newfstatat+0x55/0x70 fs/stat.c:524
x64_sys_call+0x236d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:263
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x1ef99115 -> 0x1f009caf

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 8827 Comm: udevd Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================


---
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 [email protected].

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

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages