syzbot


KCSAN: data-race in ext4_xattr_get / ext4_xattr_release_block

Status: closed as invalid on 2019/11/19 13:44
Subsystems: ext4
[Documentation on labels]
First crash: 1914d, last: 1913d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_xattr_get / ext4_xattr_release_block (2) ext4 1 1893d 1893d 0/28 auto-closed as invalid on 2020/02/01 05:27
upstream KCSAN: data-race in ext4_xattr_get / ext4_xattr_release_block (3) ext4 1 1799d 1799d 0/28 auto-closed as invalid on 2020/05/05 08:15

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_xattr_get / ext4_xattr_release_block

read to 0xffff88810c518004 of 4 bytes by task 18003 on cpu 1:
 ext4_xattr_block_cache_insert fs/ext4/xattr.c:2979 [inline]
 ext4_xattr_block_get fs/ext4/xattr.c:537 [inline]
 ext4_xattr_get+0x31e/0x5c0 fs/ext4/xattr.c:652
 ext4_xattr_security_get+0x3b/0x50 fs/ext4/xattr_security.c:20
 __vfs_getxattr+0x9a/0xd0 fs/xattr.c:311
 cap_inode_need_killpriv+0x3a/0x60 security/commoncap.c:300
 security_inode_need_killpriv+0x5d/0x90 security/security.c:1295
 dentry_needs_remove_privs.part.0+0x2d/0x80 fs/inode.c:1805
 dentry_needs_remove_privs include/linux/fs.h:3530 [inline]
 file_remove_privs+0x1e9/0x2b0 fs/inode.c:1845
 __generic_file_write_iter+0xd2/0x380 mm/filemap.c:3379
 ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268
 call_write_iter include/linux/fs.h:1895 [inline]
 do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693
 do_iter_write fs/read_write.c:970 [inline]
 do_iter_write+0x13b/0x3c0 fs/read_write.c:951
 vfs_iter_write+0x5c/0x80 fs/read_write.c:983
 iter_file_splice_write+0x4c0/0x7f0 fs/splice.c:746
 do_splice_from fs/splice.c:848 [inline]
 direct_splice_actor+0xa0/0xc0 fs/splice.c:1020

write to 0xffff88810c518004 of 4 bytes by task 7413 on cpu 0:
 ext4_xattr_release_block+0x15e/0x4b0 fs/ext4/xattr.c:1279
 ext4_xattr_delete_inode+0x634/0x760 fs/ext4/xattr.c:2932
 ext4_evict_inode+0x5fa/0xdb0 fs/ext4/inode.c:299
 evict+0x244/0x410 fs/inode.c:574
 iput_final fs/inode.c:1563 [inline]
 iput+0x371/0x4e0 fs/inode.c:1589
 do_unlinkat+0x378/0x530 fs/namei.c:4061
 __do_sys_unlink fs/namei.c:4102 [inline]
 __se_sys_unlink fs/namei.c:4100 [inline]
 __x64_sys_unlink+0x3b/0x50 fs/namei.c:4100
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7413 Comm: syz-executor.5 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/03 22:48 https://github.com/google/ktsan.git kcsan 05f2236801fe b35fad31 .config console log report ci2-upstream-kcsan-gce
2019/11/02 21:11 https://github.com/google/ktsan.git kcsan 05f2236801fe d603afc9 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.