syzbot


KCSAN: data-race in ext4_alloc_file_blocks / ext4_mpage_readpages

Status: auto-closed as invalid on 2020/06/18 14:14
Subsystems: ext4
[Documentation on labels]
First crash: 1946d, last: 1946d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_alloc_file_blocks / ext4_mpage_readpages (2) ext4 6 2 1378d 1382d 0/29 auto-closed as invalid on 2021/12/22 14:39

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_alloc_file_blocks / ext4_mpage_readpages

write to 0xffff88812133d638 of 8 bytes by task 9173 on cpu 0:
 i_size_write include/linux/fs.h:894 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3083 [inline]
 ext4_alloc_file_blocks+0x311/0x6c0 fs/ext4/extents.c:4423
 ext4_zero_range fs/ext4/extents.c:4518 [inline]
 ext4_fallocate+0x1c18/0x21f0 fs/ext4/extents.c:4643
 vfs_fallocate+0x3b1/0x640 fs/open.c:309
 ksys_fallocate+0x5b/0xa0 fs/open.c:332
 __do_sys_fallocate fs/open.c:340 [inline]
 __se_sys_fallocate fs/open.c:338 [inline]
 __x64_sys_fallocate+0x59/0x70 fs/open.c:338
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88812133d638 of 8 bytes by task 9118 on cpu 1:
 ext4_readpage_limit fs/ext4/readpage.c:221 [inline]
 ext4_mpage_readpages+0x532/0x1450 fs/ext4/readpage.c:269
 ext4_readpages+0x8e/0xb0 fs/ext4/inode.c:3243
 read_pages+0xa2/0x2d0 mm/readahead.c:126
 __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_sync_readahead+0x1b0/0x1e0 mm/readahead.c:527
 generic_file_buffered_read mm/filemap.c:2036 [inline]
 generic_file_read_iter+0xef7/0x14e0 mm/filemap.c:2309
 ext4_file_read_iter fs/ext4/file.c:131 [inline]
 ext4_file_read_iter+0x103/0x360 fs/ext4/file.c:114
 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: 1 PID: 9118 Comm: syz-executor.0 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/04/28 07:13 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 0ce7569e .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.