[moderation] [ext4?] KCSAN: data-race in file_update_time / inode_set_ctime_current

1 view
Skip to first unread message

syzbot

unread,
May 3, 2024, 3:08:28 AMMay 3
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 49a73b1652c5 Merge tag 'firewire-fixes-6.9-rc6' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14183a0f180000
kernel config: https://syzkaller.appspot.com/x/.config?x=c3beef2aff822313
dashboard link: https://syzkaller.appspot.com/bug?extid=d0260de5930561232b5f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/869474934b87/disk-49a73b16.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d7e932324bfd/vmlinux-49a73b16.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c2aedff3b667/bzImage-49a73b16.xz

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

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

read to 0xffff888108682f48 of 8 bytes by task 4725 on cpu 0:
inode_get_ctime include/linux/fs.h:1620 [inline]
inode_needs_update_time fs/inode.c:2092 [inline]
file_update_time+0x107/0x2c0 fs/inode.c:2135
ext4_page_mkwrite+0x1a4/0xb70 fs/ext4/inode.c:6060
do_page_mkwrite mm/memory.c:3091 [inline]
wp_page_shared mm/memory.c:3478 [inline]
do_wp_page+0xaf6/0x1e70 mm/memory.c:3628
handle_pte_fault mm/memory.c:5316 [inline]
__handle_mm_fault mm/memory.c:5441 [inline]
handle_mm_fault+0xb7f/0x27e0 mm/memory.c:5606
do_user_addr_fault arch/x86/mm/fault.c:1413 [inline]
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x2f5/0x6d0 arch/x86/mm/fault.c:1563
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
__put_user_4+0x11/0x20 arch/x86/lib/putuser.S:86
netlink_getsockopt+0x321/0x400 net/netlink/af_netlink.c:1798
do_sock_getsockopt+0x121/0x1a0 net/socket.c:2373
__sys_getsockopt+0x19a/0x210 net/socket.c:2402
__do_sys_getsockopt net/socket.c:2412 [inline]
__se_sys_getsockopt net/socket.c:2409 [inline]
__x64_sys_getsockopt+0x66/0x80 net/socket.c:2409
x64_sys_call+0x2ce9/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:56
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888108682f48 of 8 bytes by task 4723 on cpu 1:
inode_set_ctime_to_ts include/linux/fs.h:1626 [inline]
inode_set_ctime_current+0x38/0x50 fs/inode.c:2515
ext4_truncate+0x8b2/0xb10 fs/ext4/inode.c:4168
ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline]
ext4_write_end+0x536/0x820 fs/ext4/inode.c:1325
generic_perform_write+0x276/0x410 mm/filemap.c:3985
ext4_buffered_write_iter+0x1f6/0x380 fs/ext4/file.c:299
ext4_file_write_iter+0x29f/0xe30
call_write_iter include/linux/fs.h:2110 [inline]
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0x771/0x8e0 fs/read_write.c:590
ksys_write+0xeb/0x1b0 fs/read_write.c:643
__do_sys_write fs/read_write.c:655 [inline]
__se_sys_write fs/read_write.c:652 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:652
x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000324866f8 -> 0x00000000362245c8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 4723 Comm: syz-executor.1 Tainted: G W 6.9.0-rc6-syzkaller-00113-g49a73b1652c5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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 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

syzbot

unread,
Jun 7, 2024, 3:08:20 AMJun 7
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