syzbot


KCSAN: data-race in generic_fillattr / inode_add_bytes

Status: moderation: reported on 2024/07/10 12:20
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+a088f9d6bf95dc66a923@syzkaller.appspotmail.com
First crash: 133d, last: 1d09h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in generic_fillattr / inode_add_bytes

read-write to 0xffff888118391848 of 8 bytes by task 7135 on cpu 0:
 __inode_add_bytes fs/stat.c:903 [inline]
 inode_add_bytes+0x45/0xd0 fs/stat.c:916
 __dquot_alloc_space+0x181/0x8a0 fs/quota/dquot.c:1694
 dquot_alloc_space_nodirty include/linux/quotaops.h:299 [inline]
 dquot_alloc_block_nodirty include/linux/quotaops.h:326 [inline]
 shmem_inode_acct_blocks+0x124/0x230 mm/shmem.c:237
 shmem_alloc_and_add_folio mm/shmem.c:1843 [inline]
 shmem_get_folio_gfp+0x5be/0xd90 mm/shmem.c:2335
 shmem_get_folio mm/shmem.c:2441 [inline]
 shmem_write_begin+0xa2/0x180 mm/shmem.c:3094
 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4056
 shmem_file_write_iter+0xc2/0xe0 mm/shmem.c:3269
 __kernel_write_iter+0x24b/0x4e0 fs/read_write.c:612
 dump_emit_page fs/coredump.c:884 [inline]
 dump_user_range+0x3ac/0x550 fs/coredump.c:945
 elf_core_dump+0x1b66/0x1c60 fs/binfmt_elf.c:2127
 do_coredump+0x1736/0x1ce0 fs/coredump.c:758
 get_signal+0xdc0/0x1070 kernel/signal.c:2903
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 irqentry_exit_to_user_mode+0x9a/0x130 kernel/entry/common.c:231
 irqentry_exit+0x12/0x50 kernel/entry/common.c:334
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffff888118391848 of 8 bytes by task 3325 on cpu 1:
 generic_fillattr+0x274/0x330 fs/stat.c:106
 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: 0x0000000000003980 -> 0x0000000000003998

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3325 Comm: syz-executor Not tainted 6.12.0-syzkaller-00971-g158f238aa69d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/19 21:51 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/10/19 16:04 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/10/17 02:08 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/10/12 12:12 upstream 09f6b0c8904b 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/10/05 11:47 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/09/26 15:17 upstream 11a299a7933e 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/09/14 02:57 upstream 196145c606d0 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/31 03:25 upstream 20371ba12063 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/26 20:20 upstream 5be63fc19fca 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/19 22:28 upstream 47ac09b91bef 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/16 07:16 upstream d7a5aa4b3c00 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/15 07:27 upstream d07b43284ab3 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/08/06 13:21 upstream b446a2dae984 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/07/27 17:28 upstream 3a7e02c040b1 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/07/27 04:13 upstream 2f8c4f506285 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
2024/07/10 12:19 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_add_bytes
* Struck through repros no longer work on HEAD.