syzbot


KCSAN: data-race in ext4_setattr / generic_file_buffered_read

Status: auto-closed as invalid on 2020/09/11 12:48
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 837d, last: 787d
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 (3) 12 591d 665d 0/24 auto-closed as invalid on 2021/03/26 18:29
upstream KCSAN: data-race in ext4_setattr / generic_file_buffered_read (2) 3 735d 750d 0/24 auto-closed as invalid on 2020/11/02 08:43

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

write to 0xffff8880bb6cc778 of 8 bytes by task 9871 on cpu 0:
 i_size_write include/linux/fs.h:866 [inline]
 ext4_setattr+0xd63/0xec0 fs/ext4/inode.c:5386
 notify_change+0x7d7/0xa80 fs/attr.c:336
 do_truncate+0xe0/0x120 fs/open.c:64
 handle_truncate fs/namei.c:2901 [inline]
 do_open fs/namei.c:3247 [inline]
 path_openat+0x1a31/0x20c0 fs/namei.c:3360
 do_filp_open+0xbd/0x1d0 fs/namei.c:3387
 do_sys_openat2+0x33b/0x500 fs/open.c:1179
 do_sys_open fs/open.c:1195 [inline]
 ksys_open include/linux/syscalls.h:1390 [inline]
 __do_sys_creat fs/open.c:1263 [inline]
 __se_sys_creat fs/open.c:1261 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1261
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880bb6cc778 of 8 bytes by task 9868 on cpu 1:
 i_size_read include/linux/fs.h:844 [inline]
 generic_file_buffered_read+0x1190/0x1cf0 mm/filemap.c:2159
 generic_file_read_iter+0x7d/0x3e0 mm/filemap.c:2396
 ext4_file_read_iter+0x2d8/0x420 fs/ext4/file.c:74
 call_read_iter include/linux/fs.h:1862 [inline]
 generic_file_splice_read+0x22b/0x310 fs/splice.c:312
 do_splice_to fs/splice.c:870 [inline]
 splice_direct_to_actor+0x2a8/0x660 fs/splice.c:950
 do_splice_direct+0xf2/0x170 fs/splice.c:1059
 do_sendfile+0x56a/0xba0 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1595 [inline]
 __se_sys_sendfile64 fs/read_write.c:1587 [inline]
 __x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1587
 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: 1 PID: 9868 Comm: syz-executor.5 Not tainted 5.8.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (16):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/08/07 12:43 upstream 86cfccb66937 28ac5c9e .config log report
ci2-upstream-kcsan-gce 2020/08/06 18:00 upstream 47ec5303d73e 4ca1c0ea .config log report
ci2-upstream-kcsan-gce 2020/07/25 02:09 upstream 68845a55c31b 0a13649c .config log report
ci2-upstream-kcsan-gce 2020/07/24 08:41 upstream f37e99aca03f 70c104a1 .config log report
ci2-upstream-kcsan-gce 2020/07/23 10:44 upstream d15be546031c 340ea530 .config log report
ci2-upstream-kcsan-gce 2020/07/12 15:40 upstream 0aea6d5c5be3 115e1930 .config log report
ci2-upstream-kcsan-gce 2020/07/03 15:54 upstream cdd3bb54332f 6e569755 .config log report
ci2-upstream-kcsan-gce 2020/07/02 00:42 upstream edb543cfe5db bed10395 .config log report
ci2-upstream-kcsan-gce 2020/07/01 13:50 upstream 7c30b859a947 39acb39d .config log report
ci2-upstream-kcsan-gce 2020/07/01 00:30 upstream 7c30b859a947 c0383ebe .config log report
ci2-upstream-kcsan-gce 2020/06/30 05:11 upstream 7c30b859a947 917afeaa .config log report
ci2-upstream-kcsan-gce 2020/06/29 13:29 upstream 9ebcfadb0610 df01f6fc .config log report
ci2-upstream-kcsan-gce 2020/06/29 02:49 upstream 9ebcfadb0610 a2cdad9d .config log report
ci2-upstream-kcsan-gce 2020/06/28 20:33 upstream 91a9a90d040e a2cdad9d .config log report
ci2-upstream-kcsan-gce 2020/06/26 10:52 upstream 4a21185cda0f aea82c00 .config log report
ci2-upstream-kcsan-gce 2020/06/19 06:07 upstream 5e857ce6eae7 bc258b50 .config log report
* Struck through repros no longer work on HEAD.