syzbot


KCSAN: data-race in block_read_full_page / truncate_setsize

Status: auto-closed as invalid on 2020/06/18 14:14
Subsystems: fs
[Documentation on labels]
First crash: 1441d, last: 1441d

Sample crash report:
MINIX-fs: mounting unchecked file system, running fsck is recommended
==================================================================
BUG: KCSAN: data-race in block_read_full_page / truncate_setsize

write to 0xffff8880bb5d4db0 of 8 bytes by task 24174 on cpu 1:
 i_size_write include/linux/fs.h:894 [inline]
 truncate_setsize+0x34/0x80 mm/truncate.c:839
 minix_setattr+0xdd/0x120 fs/minix/file.c:40
 notify_change+0x82b/0xad0 fs/attr.c:336
 do_truncate+0xf9/0x180 fs/open.c:64
 handle_truncate fs/namei.c:2887 [inline]
 do_open fs/namei.c:3233 [inline]
 path_openat+0x1e51/0x23d0 fs/namei.c:3346
 do_filp_open+0x11e/0x1b0 fs/namei.c:3373
 do_sys_openat2+0x52e/0x680 fs/open.c:1148
 do_sys_open+0xa2/0x110 fs/open.c:1164
 ksys_open include/linux/syscalls.h:1386 [inline]
 __do_sys_creat fs/open.c:1232 [inline]
 __se_sys_creat fs/open.c:1230 [inline]
 __x64_sys_creat+0x42/0x60 fs/open.c:1230
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880bb5d4db0 of 8 bytes by task 24153 on cpu 0:
 block_read_full_page+0xb6/0x720 fs/buffer.c:2264
 minix_readpage+0x23/0x40 fs/minix/inode.c:388
 read_pages+0x248/0x360 mm/readahead.c:136
 __do_page_cache_readahead+0x358/0x380 mm/readahead.c:212
 ra_submit mm/internal.h:62 [inline]
 ondemand_readahead+0x369/0x730 mm/readahead.c:492
 page_cache_async_readahead+0x237/0x260 mm/readahead.c:574
 generic_file_buffered_read mm/filemap.c:2044 [inline]
 generic_file_read_iter+0x1077/0x18c0 mm/filemap.c:2309
 call_read_iter include/linux/fs.h:1901 [inline]
 new_sync_read+0x306/0x450 fs/read_write.c:415
 __vfs_read+0x9e/0xb0 fs/read_write.c:428
 integrity_kernel_read+0x97/0xe0 security/integrity/iint.c:200
 ima_calc_file_hash_tfm+0x18f/0x240 security/integrity/ima/ima_crypto.c:358
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:389 [inline]
 ima_calc_file_hash+0x147/0xeb0 security/integrity/ima/ima_crypto.c:454
 ima_collect_measurement+0x385/0x3b0 security/integrity/ima/ima_api.c:249
 process_measurement+0x91a/0x1000 security/integrity/ima/ima_main.c:324
 ima_file_check+0x7e/0xb0 security/integrity/ima/ima_main.c:440
 do_open fs/namei.c:3231 [inline]
 path_openat+0x176e/0x23d0 fs/namei.c:3346
 do_filp_open+0x11e/0x1b0 fs/namei.c:3373
 do_sys_openat2+0x52e/0x680 fs/open.c:1148
 do_sys_open+0xa2/0x110 fs/open.c:1164
 ksys_open include/linux/syscalls.h:1386 [inline]
 __do_sys_open fs/open.c:1170 [inline]
 __se_sys_open fs/open.c:1168 [inline]
 __x64_sys_open+0x50/0x60 fs/open.c:1168
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24153 Comm: syz-executor.5 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/14 00:59 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a885920d .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.