[moderation] [fs?] KCSAN: data-race in generic_fillattr / inode_set_ctime_current

2 views
Skip to first unread message

syzbot

unread,
Dec 9, 2023, 7:00:28 PM12/9/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bee0e7762ad2 Merge tag 'for-linus-iommufd' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13ab3b8ce80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=8bacf25401e68ad895fe
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [bra...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/233be5f65dd2/disk-bee0e776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94423738a289/vmlinux-bee0e776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b977463fa9a/bzImage-bee0e776.xz

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

==================================================================
BUG: KCSAN: data-race in generic_fillattr / inode_set_ctime_current

write to 0xffff88810762bbc0 of 8 bytes by task 3395 on cpu 1:
inode_set_ctime_to_ts include/linux/fs.h:1597 [inline]
inode_set_ctime include/linux/fs.h:1615 [inline]
inode_set_ctime_current+0x16c/0x1d0 fs/inode.c:2550
shmem_xattr_handler_set+0x1a9/0x220 mm/shmem.c:3695
__vfs_setxattr+0x2de/0x300 fs/xattr.c:201
__vfs_setxattr_noperm+0xed/0x3e0 fs/xattr.c:235
__vfs_setxattr_locked+0x1af/0x1d0 fs/xattr.c:296
vfs_setxattr+0x140/0x280 fs/xattr.c:322
do_setxattr fs/xattr.c:630 [inline]
setxattr+0x1bc/0x230 fs/xattr.c:653
path_setxattr+0xf5/0x1a0 fs/xattr.c:672
__do_sys_lsetxattr fs/xattr.c:695 [inline]
__se_sys_lsetxattr fs/xattr.c:691 [inline]
__x64_sys_lsetxattr+0x6a/0x80 fs/xattr.c:691
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88810762bbc0 of 8 bytes by task 3132 on cpu 0:
inode_get_ctime include/linux/fs.h:1591 [inline]
generic_fillattr+0x1e0/0x2f0 fs/stat.c:62
shmem_getattr+0x17b/0x200 mm/shmem.c:1121
vfs_getattr_nosec fs/stat.c:135 [inline]
vfs_getattr+0x198/0x1e0 fs/stat.c:176
vfs_statx+0x12f/0x2f0 fs/stat.c:248
vfs_fstatat+0xcd/0x100 fs/stat.c:299
__do_sys_newfstatat fs/stat.c:463 [inline]
__se_sys_newfstatat+0x58/0x260 fs/stat.c:457
__x64_sys_newfstatat+0x55/0x60 fs/stat.c:457
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000013fdb881 -> 0x00000000152ee581

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3132 Comm: udevd Tainted: G W 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2


---
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.

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