syzbot


KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl (4)

Status: fixed on 2021/04/09 19:46
Subsystems: tomoyo
[Documentation on labels]
Reported-by: syzbot+0789a72b46fd91431bd8@syzkaller.appspotmail.com
Fix commit: 5797e861e402 tomoyo: ignore data race while checking quota
First crash: 1348d, last: 1227d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 5.10 000/102] 5.10.21-rc1 review 119 (119) 2021/03/08 13:21
[PATCH 5.11 000/104] 5.11.4-rc1 review 119 (119) 2021/03/07 11:37
[PATCH AUTOSEL 5.11 01/67] ath10k: prevent deinitializing NAPI twice 80 (80) 2021/03/06 17:52
[PATCH AUTOSEL 5.10 01/56] EDAC/amd64: Do not load on family 0x15, model 0x13 59 (59) 2021/03/05 12:40
[PATCH AUTOSEL 4.14 01/16] staging: fwserial: Fix error handling in fwserial_create 17 (17) 2021/02/24 13:22
[PATCH AUTOSEL 4.19 01/26] staging: fwserial: Fix error handling in fwserial_create 27 (27) 2021/02/24 13:21
[PATCH AUTOSEL 5.4 01/40] staging: fwserial: Fix error handling in fwserial_create 41 (41) 2021/02/24 13:20
[PATCH AUTOSEL 4.4 01/11] staging: fwserial: Fix error handling in fwserial_create 11 (11) 2021/02/24 12:55
[PATCH AUTOSEL 4.9 01/12] staging: fwserial: Fix error handling in fwserial_create 12 (12) 2021/02/24 12:55
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl tomoyo 2 1691d 1704d 0/27 closed as invalid on 2019/11/19 13:54
upstream KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl (3) tomoyo 5 1392d 1454d 0/27 auto-closed as invalid on 2020/10/05 09:28
upstream KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl (2) tomoyo 15 1473d 1675d 0/27 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl

write to 0xffff8881077d121a of 2 bytes by task 8454 on cpu 1:
 tomoyo_merge_path_acl+0x4c/0x70 security/tomoyo/file.c:372
 tomoyo_update_domain+0x337/0x3a0 security/tomoyo/domain.c:131
 tomoyo_update_path_acl security/tomoyo/file.c:398 [inline]
 tomoyo_write_file+0x210/0x910 security/tomoyo/file.c:1022
 tomoyo_write_domain2 security/tomoyo/common.c:1152 [inline]
 tomoyo_add_entry security/tomoyo/common.c:2042 [inline]
 tomoyo_supervisor+0xace/0xb40 security/tomoyo/common.c:2103
 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
 tomoyo_path_permission security/tomoyo/file.c:587 [inline]
 tomoyo_check_open_permission+0x2d0/0x370 security/tomoyo/file.c:780
 tomoyo_file_open+0xd3/0xf0 security/tomoyo/tomoyo.c:313
 security_file_open+0x3f/0x90 security/security.c:1576
 do_dentry_open+0x22d/0x890 fs/open.c:804
 vfs_open+0x43/0x50 fs/open.c:931
 do_open fs/namei.c:3254 [inline]
 path_openat+0x1847/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 0xffff8881077d121a of 2 bytes by task 8457 on cpu 0:
 tomoyo_domain_quota_is_ok+0xd7/0x2d0 security/tomoyo/util.c:1064
 tomoyo_supervisor+0x1f4/0xb40 security/tomoyo/common.c:2089
 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline]
 tomoyo_path_number_perm+0x227/0x2d0 security/tomoyo/file.c:734
 tomoyo_path_chmod+0x23/0x30 security/tomoyo/tomoyo.c:342
 security_path_chmod+0x92/0xe0 security/security.c:1153
 chmod_common+0xe6/0x280 fs/open.c:578
 do_fchmodat fs/open.c:621 [inline]
 __do_sys_fchmodat fs/open.c:634 [inline]
 __se_sys_fchmodat fs/open.c:631 [inline]
 __x64_sys_fchmodat+0x9b/0x120 fs/open.c:631
 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: 8457 Comm: syz-fuzzer Not tainted 5.11.0-rc7-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/12 06:03 upstream 291009f656e8 a5f86b15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl
2021/02/05 18:57 upstream dd86e7fa07a3 23a562df .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl
2021/01/24 04:35 upstream e1ae4b0be158 52e37319 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in tomoyo_domain_quota_is_ok / tomoyo_merge_path_acl
2021/01/13 13:07 upstream e609571b5ffa a945f0a3 .config console log report info ci2-upstream-kcsan-gce
2021/01/11 12:09 upstream 7c53f6b671f4 2c1f2513 .config console log report info ci2-upstream-kcsan-gce
2020/12/31 02:20 upstream f6e1ea196492 5cc121d6 .config console log report info ci2-upstream-kcsan-gce
2020/12/30 07:23 upstream 139711f033f6 0fa352f2 .config console log report info ci2-upstream-kcsan-gce
2020/12/22 04:33 upstream 8653b778e454 04201c06 .config console log report info ci2-upstream-kcsan-gce
2020/11/24 04:57 upstream d5beb3140f91 1ab681a4 .config console log report info ci2-upstream-kcsan-gce
2020/11/21 11:02 upstream 27bba9c532a8 c7ec2d19 .config console log report info ci2-upstream-kcsan-gce
2020/10/21 14:47 upstream c4d6fe731176 99c64d5c .config console log report info ci2-upstream-kcsan-gce
2020/10/13 21:12 upstream 6ad4bf6ea160 fc7735a2 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.