syzbot


WARNING: locking bug in __mark_inode_dirty

Status: upstream: reported C repro on 2024/03/06 22:33
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+8aca6387ff573aa9a06f@syzkaller.appspotmail.com
First crash: 61d, last: 19d
Bug presence (1)
Date Name Commit Repro Result
2024/05/03 upstream (ToT) f03359bca01b C [report] KASAN: out-of-bounds Write in end_buffer_read_sync

Sample crash report:
ntfs3: loop3: MFT: r=19, expect seq=0 instead of 1!
ntfs3: loop3: Mark volume as dirty due to NTFS errors
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)
WARNING: CPU: 0 PID: 6311 at kernel/locking/lockdep.c:5347 __lock_release kernel/locking/lockdep.c:5347 [inline]
WARNING: CPU: 0 PID: 6311 at kernel/locking/lockdep.c:5347 lock_release+0x447/0x9a0 kernel/locking/lockdep.c:5643
Modules linked in:
CPU: 0 PID: 6311 Comm: syz-executor351 Not tainted 5.15.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__lock_release kernel/locking/lockdep.c:5347 [inline]
RIP: 0010:lock_release+0x447/0x9a0 kernel/locking/lockdep.c:5643
Code: 00 00 00 00 fc ff df 4c 8b 64 24 08 48 8b 5c 24 28 0f 85 76 01 00 00 48 c7 c7 20 28 8b 8a 48 c7 c6 80 4c 8b 8a e8 e9 2e e9 ff <0f> 0b e9 5c 01 00 00 4c 89 ef 48 8b 74 24 20 48 8b 54 24 50 e8 c0
RSP: 0018:ffffc90005c4e780 EFLAGS: 00010046
RAX: 19b99e04d3a03800 RBX: 0000000000000246 RCX: ffff88801b819dc0
RDX: 0000000000000000 RSI: 0000000080000002 RDI: 0000000000000000
RBP: ffffc90005c4e8b0 R08: ffffffff8166862c R09: ffffed1017344f24
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000b89cfc
R13: 000000000004020d R14: 0000000000000246 R15: dffffc0000000000
FS:  000055555738b380(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa7de56dc00 CR3: 000000001c0f6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __raw_spin_unlock include/linux/spinlock_api_smp.h:150 [inline]
 _raw_spin_unlock+0x12/0x40 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:403 [inline]
 __mark_inode_dirty+0x6f4/0xd60 fs/fs-writeback.c:2548
 generic_update_time fs/inode.c:1817 [inline]
 inode_update_time fs/inode.c:1830 [inline]
 touch_atime+0x3fa/0x680 fs/inode.c:1902
 file_accessed include/linux/fs.h:2516 [inline]
 filemap_read+0x2779/0x2980 mm/filemap.c:2715
 __kernel_read+0x5ac/0xa60 fs/read_write.c:443
 integrity_kernel_read+0xac/0xf0 security/integrity/iint.c:228
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
 ima_calc_file_hash+0xa5d/0x1c00 security/integrity/ima/ima_crypto.c:573
 ima_collect_measurement+0x37e/0x800 security/integrity/ima/ima_api.c:255
 process_measurement+0x1363/0x21c0 security/integrity/ima/ima_main.c:351
 ima_file_check+0xf3/0x180 security/integrity/ima/ima_main.c:533
 do_open fs/namei.c:3610 [inline]
 path_openat+0x2748/0x2f20 fs/namei.c:3742
 do_filp_open+0x21c/0x460 fs/namei.c:3769
 do_sys_openat2+0x13b/0x500 fs/open.c:1253
 do_sys_open fs/open.c:1269 [inline]
 __do_sys_openat fs/open.c:1285 [inline]
 __se_sys_openat fs/open.c:1280 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1280
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fa7e67b5009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 1b 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc4ab43c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa7e67b5009
RDX: 0000000000000000 RSI: 0000000020000180 RDI: ffffffffffffff9c
RBP: 0000000000000000 R08: 000000000001f6c2 R09: 00007ffcc4ab4400
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcc4ab43ec
R13: 0000000000000221 R14: 431bde82d7b634db R15: 00007ffcc4ab4420
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/18 01:51 linux-5.15.y c52b9710c83d acc528cb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan WARNING: locking bug in __mark_inode_dirty
2024/03/07 00:09 linux-5.15.y 574362648507 f39a7eed .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan WARNING: locking bug in __mark_inode_dirty
2024/03/06 22:33 linux-5.15.y 574362648507 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan WARNING: locking bug in __mark_inode_dirty
* Struck through repros no longer work on HEAD.