syzbot


KCSAN: data-race in ext4_setattr / generic_file_buffered_read (3)

Status: auto-closed as invalid on 2021/03/26 18:29
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+d3272ea1c7536cf44408@syzkaller.appspotmail.com
First crash: 1220d, last: 1123d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_setattr / generic_file_buffered_read (2) ext4 3 1268d 1282d 0/26 auto-closed as invalid on 2020/11/02 08:43
upstream KCSAN: data-race in ext4_setattr / generic_file_buffered_read ext4 16 1319d 1369d 0/26 auto-closed as invalid on 2020/09/11 12:48

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_setattr / generic_file_buffered_read

write to 0xffff88810d9526b0 of 8 bytes by task 23890 on cpu 1:
 i_size_write include/linux/fs.h:870 [inline]
 ext4_setattr+0xe19/0xf60 fs/ext4/inode.c:5483
 notify_change+0x86d/0xa60 fs/attr.c:336
 do_truncate+0xe0/0x120 fs/open.c:64
 handle_truncate fs/namei.c:2912 [inline]
 do_open fs/namei.c:3258 [inline]
 path_openat+0x1a30/0x20a0 fs/namei.c:3371
 do_filp_open+0xbd/0x1d0 fs/namei.c:3398
 do_sys_openat2+0xa3/0x250 fs/open.c:1172
 do_sys_open fs/open.c:1188 [inline]
 __do_sys_openat fs/open.c:1204 [inline]
 __se_sys_openat fs/open.c:1199 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1199
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810d9526b0 of 8 bytes by task 23887 on cpu 0:
 i_size_read include/linux/fs.h:848 [inline]
 generic_file_buffered_read+0x290/0x9c0 mm/filemap.c:2500
 generic_file_read_iter+0x82/0x3e0 mm/filemap.c:2637
 ext4_file_read_iter+0x2e0/0x430 fs/ext4/file.c:74
 __kernel_read+0x306/0x580 fs/read_write.c:454
 integrity_kernel_read+0x4c/0x70 security/integrity/iint.c:191
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:484 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:515 [inline]
 ima_calc_file_hash+0x929/0x1310 security/integrity/ima/ima_crypto.c:572
 ima_collect_measurement+0x168/0x310 security/integrity/ima/ima_api.c:250
 process_measurement+0xa4c/0x10c0 security/integrity/ima/ima_main.c:330
 ima_file_check+0x75/0xa0 security/integrity/ima/ima_main.c:498
 do_open fs/namei.c:3256 [inline]
 path_openat+0x188a/0x20a0 fs/namei.c:3371
 do_filp_open+0xbd/0x1d0 fs/namei.c:3398
 do_sys_openat2+0xa3/0x250 fs/open.c:1172
 do_sys_open fs/open.c:1188 [inline]
 __do_sys_openat fs/open.c:1204 [inline]
 __se_sys_openat fs/open.c:1199 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1199
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/19 18:28 upstream f40ddce88593 f689d40a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_setattr / generic_file_buffered_read
2021/02/13 12:23 upstream c6d8570e4d64 98682e5e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_setattr / generic_file_buffered_read
2021/01/14 02:02 upstream 65f0d2414b70 269d24e8 .config console log report info ci2-upstream-kcsan-gce
2021/01/11 16:22 upstream 7c53f6b671f4 2c1f2513 .config console log report info ci2-upstream-kcsan-gce
2020/12/30 13:42 upstream 139711f033f6 ecb8c012 .config console log report info ci2-upstream-kcsan-gce
2020/12/15 20:17 upstream 148842c98a24 f213e07e .config console log report info ci2-upstream-kcsan-gce
2020/12/13 22:34 upstream ec6f5e0e5ca0 8f160dd5 .config console log report info ci2-upstream-kcsan-gce
2020/11/28 03:01 upstream c84e1efae022 486f93ef .config console log report info ci2-upstream-kcsan-gce
2020/11/27 18:49 upstream 85a2c56cb445 486f93ef .config console log report info ci2-upstream-kcsan-gce
2020/11/21 09:52 upstream 27bba9c532a8 68068804 .config console log report info ci2-upstream-kcsan-gce
2020/11/20 18:41 upstream 4d02da974ea8 68068804 .config console log report info ci2-upstream-kcsan-gce
2020/11/15 03:29 upstream e28c0d7c92c8 1bf9a662 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.