syzbot


WARNING in attr_data_get_block (4)

Status: upstream: reported C repro on 2024/04/08 08:26
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+8e034d7422d389827720@syzkaller.appspotmail.com
First crash: 227d, last: 45d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 1fd21919de6de245b63066b8ee3cfba92e36f0e9
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Thu Aug 22 11:43:32 2024 +0000

  fs/ntfs3: Stale inode instead of bad

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ntfs3?] WARNING in attr_data_get_block (4) 0 (2) 2024/11/12 03:23
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in attr_data_get_block (3) ntfs3 C done done 3 398d 412d 0/28 auto-obsoleted due to no activity on 2024/01/27 12:18
upstream WARNING in attr_data_get_block (2) ntfs3 C error done 4 574d 606d 0/28 auto-obsoleted due to no activity on 2023/08/23 09:08
upstream WARNING in attr_data_get_block ntfs3 1 754d 750d 0/28 auto-obsoleted due to no activity on 2023/02/25 17:56
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/04/26 08:06 1h45m retest repro upstream report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/11/11 22:07 5h15m bisect fix upstream OK (1) job log
2024/10/07 03:24 2h33m bisect fix upstream OK (0) job log log
2024/09/06 11:06 2h12m bisect fix upstream OK (0) job log log
2024/08/07 07:48 3h16m bisect fix upstream OK (0) job log log
2024/07/03 14:00 3h00m bisect fix upstream OK (0) job log log

Sample crash report:
R13: 00007ffd11b1eed8 R14: 431bde82d7b634db R15: 00007fad9422c03b
 </TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x100, magic = 0x0, owner = 0xffff888022b61e01, curr 0xffff888022b61e00, list not empty
WARNING: CPU: 0 PID: 5077 at kernel/locking/rwsem.c:1342 __up_read+0x508/0x760 kernel/locking/rwsem.c:1342
Modules linked in:
CPU: 0 PID: 5077 Comm: syz-executor179 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__up_read+0x508/0x760 kernel/locking/rwsem.c:1342
Code: 24 10 80 3c 02 00 0f 85 21 02 00 00 48 8b 13 41 57 48 c7 c6 a0 bf 0c 8b 48 c7 c7 e0 bf 0c 8b 4c 8b 4c 24 08 e8 39 9a e5 ff 90 <0f> 0b 90 90 5f e9 c3 fe ff ff c6 05 2c 8a 1d 0e 01 90 4c 8d 7b 58
RSP: 0018:ffffc900043c6338 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff8880792208a0 RCX: ffffffff8150f3e9
RDX: ffff888022b61e00 RSI: ffffffff8150f3f6 RDI: 0000000000000001
RBP: ffffffff8f9f76b4 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff8880792208a8
R13: 1ffff92000878c6b R14: ffff888079220908 R15: ffffffff8b0cbf60
FS:  00005555685f1380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fad9427a100 CR3: 0000000078f48000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 attr_data_get_block+0x1f9/0x1b70 fs/ntfs3/attrib.c:905
 ntfs_get_block_vbo+0x288/0xec0 fs/ntfs3/inode.c:587
 do_mpage_readpage+0x663/0x17c0 fs/mpage.c:232
 mpage_readahead+0x34d/0x590 fs/mpage.c:381
 ntfs_readahead+0x1f7/0x250 fs/ntfs3/inode.c:755
 read_pages+0x1ab/0xda0 mm/readahead.c:160
 page_cache_ra_unbounded+0x455/0x5f0 mm/readahead.c:269
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order+0x7b7/0xa70 mm/readahead.c:544
 ondemand_readahead+0x520/0x1140 mm/readahead.c:666
 page_cache_sync_ra+0x174/0x1d0 mm/readahead.c:693
 page_cache_sync_readahead include/linux/pagemap.h:1300 [inline]
 filemap_get_pages+0xc0f/0x1840 mm/filemap.c:2507
 filemap_read+0x39b/0xcf0 mm/filemap.c:2603
 generic_file_read_iter+0x350/0x460 mm/filemap.c:2784
 ntfs_file_read_iter+0x258/0x330 fs/ntfs3/file.c:768
 __kernel_read+0x3ef/0xb20 fs/read_write.c:434
 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:28
 ima_calc_file_hash_tfm+0x2cf/0x3e0 security/integrity/ima/ima_crypto.c:485
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
 ima_calc_file_hash+0x1c6/0x4a0 security/integrity/ima/ima_crypto.c:573
 ima_collect_measurement+0x7eb/0x950 security/integrity/ima/ima_api.c:291
 process_measurement+0x11ae/0x2100 security/integrity/ima/ima_main.c:359
 ima_file_check+0xc1/0x110 security/integrity/ima/ima_main.c:559
 security_file_post_open+0x70/0xc0 security/security.c:2975
 do_open fs/namei.c:3644 [inline]
 path_openat+0x17ad/0x2990 fs/namei.c:3799
 do_file_open_root+0x2dd/0x5b0 fs/namei.c:3851
 file_open_root+0x2a8/0x450 fs/open.c:1386
 do_handle_open+0x3c9/0x5c0 fs/fhandle.c:235
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fad941e3b19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007ffd11b1ec88 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fad941e3b19
RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000005
RBP: 00007fad942765f0 R08: 00005555685f24c0 R09: 00005555685f24c0
R10: 00005555685f24c0 R11: 0000000000000246 R12: 00007ffd11b1ecb0
R13: 00007ffd11b1eed8 R14: 431bde82d7b634db R15: 00007fad9422c03b
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/07 20:47 upstream fe46a7dd189e ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root WARNING in attr_data_get_block
* Struck through repros no longer work on HEAD.