syzbot


KCSAN: data-race in fat12_ent_put / fat_parse_short

Status: closed as invalid on 2020/06/18 14:24
Subsystems: exfat
[Documentation on labels]
First crash: 1605d, last: 1407d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fat12_ent_put / fat_parse_short

write to 0xffff8880b2181243 of 1 bytes by task 14019 on cpu 1:
 fat12_ent_put+0x9d/0x1b0 fs/fat/fatent.c:163
 fat_alloc_clusters+0x4e1/0xbf0 fs/fat/fatent.c:501
 fat_add_cluster+0x3b/0xd0 fs/fat/inode.c:108
 __fat_get_block fs/fat/inode.c:155 [inline]
 fat_get_block+0x3c6/0x4f0 fs/fat/inode.c:190
 __block_write_begin_int+0x306/0xf80 fs/buffer.c:2002
 __block_write_begin fs/buffer.c:2052 [inline]
 block_write_begin+0x76/0x200 fs/buffer.c:2111
 cont_write_begin+0x3bd/0x660 fs/buffer.c:2460
 fat_write_begin+0x69/0xc0 fs/fat/inode.c:236
 generic_perform_write+0x13a/0x320 mm/filemap.c:3302
 __generic_file_write_iter+0x240/0x370 mm/filemap.c:3431
 generic_file_write_iter+0x294/0x38e mm/filemap.c:3463
 call_write_iter include/linux/fs.h:1907 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:694
 do_iter_write fs/read_write.c:999 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:980
 vfs_iter_write+0x56/0x80 fs/read_write.c:1040
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x380/0x800 fs/read_write.c:1521
 __do_sys_sendfile64 fs/read_write.c:1576 [inline]
 __se_sys_sendfile64 fs/read_write.c:1568 [inline]
 __x64_sys_sendfile64+0xb8/0x140 fs/read_write.c:1568
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880b2181240 of 11 bytes by task 14032 on cpu 0:
 fat_parse_short+0x159/0x1140 include/linux/string.h:381
 fat_search_long+0x260/0xba0 fs/fat/dir.c:507
 vfat_find+0xb5/0xc0 fs/fat/namei_vfat.c:698
 vfat_lookup+0x73/0x340 fs/fat/namei_vfat.c:712
 lookup_open fs/namei.c:3060 [inline]
 open_last_lookups fs/namei.c:3155 [inline]
 path_openat+0xb33/0x23d0 fs/namei.c:3343
 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

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

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/17 23:37 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 d45a4d69 .config console log report ci2-upstream-kcsan-gce
2020/04/25 02:29 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 03d97a1b .config console log report ci2-upstream-kcsan-gce
2020/03/10 05:29 https://github.com/google/ktsan.git kcsan 941e0d917bbf 35f53e45 .config console log report ci2-upstream-kcsan-gce
2020/01/15 19:14 https://github.com/google/ktsan.git kcsan 245a43005292 f9b69507 .config console log report ci2-upstream-kcsan-gce
2019/12/28 17:43 https://github.com/google/ktsan.git kcsan 245a43005292 af6b8ef8 .config console log report ci2-upstream-kcsan-gce
2019/12/11 00:06 https://github.com/google/ktsan.git kcsan ef798c30ba4e 101194eb .config console log report ci2-upstream-kcsan-gce
2019/12/03 04:21 https://github.com/google/ktsan.git kcsan ef798c30ba4e ab342da3 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.