syzbot


possible deadlock in attr_data_get_block

Status: upstream: reported C repro on 2023/03/29 04:32
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+f159b81656e067e7746b@syzkaller.appspotmail.com
First crash: 557d, last: 9d20h
Bug presence (2)
Date Name Commit Repro Result
2024/03/06 linux-6.1.y (ToT) a3eb3a74aa8c C [report] possible deadlock in attr_data_get_block
2024/03/06 upstream (ToT) 5847c9777c30 C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in attr_data_get_block ntfs3 C error 3111 53d 720d 27/28 fixed on 2024/08/14 03:44
linux-5.15 possible deadlock in attr_data_get_block origin:lts-only C done 205 15d 559d 0/3 upstream: reported C repro on 2023/03/27 15:11
upstream possible deadlock in attr_data_get_block (2) ntfs3 C error 806 10m 52d 0/28 upstream: reported C repro on 2024/08/15 10:46
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/14 13:30 1h54m fix candidate upstream OK (0) job log

Sample crash report:
loop0: detected capacity change from 0 to 4096
======================================================
WARNING: possible circular locking dependency detected
6.1.80-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor393/4220 is trying to acquire lock:
ffff0000e20b77b0 (&ni->file.run_lock#3){++++}-{3:3}, at: attr_data_get_block+0x220/0x1bdc fs/ntfs3/attrib.c:903

but task is already holding lock:
ffff0000ddffab48 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
ffff0000ddffab48 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x2b4 mm/util.c:518

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&mm->mmap_lock){++++}-{3:3}:
       __might_fault+0xc4/0x124 mm/memory.c:5831
       _copy_to_user include/linux/uaccess.h:143 [inline]
       copy_to_user include/linux/uaccess.h:169 [inline]
       fiemap_fill_next_extent+0x1b4/0x424 fs/ioctl.c:144
       ni_fiemap+0x7dc/0xe10 fs/ntfs3/frecord.c:2066
       ntfs_fiemap+0x110/0x168 fs/ntfs3/file.c:1247
       ioctl_fiemap fs/ioctl.c:219 [inline]
       do_vfs_ioctl+0x194c/0x26f8 fs/ioctl.c:810
       __do_sys_ioctl fs/ioctl.c:868 [inline]
       __se_sys_ioctl fs/ioctl.c:856 [inline]
       __arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:856
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #0 (&ni->file.run_lock#3){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain kernel/locking/lockdep.c:3825 [inline]
       __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049
       lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
       down_read+0x64/0x308 kernel/locking/rwsem.c:1520
       attr_data_get_block+0x220/0x1bdc fs/ntfs3/attrib.c:903
       ntfs_file_mmap+0x3a4/0x688 fs/ntfs3/file.c:387
       call_mmap include/linux/fs.h:2256 [inline]
       mmap_region+0xdd0/0x1a98 mm/mmap.c:2763
       do_mmap+0xa00/0x1108 mm/mmap.c:1425
       vm_mmap_pgoff+0x1a4/0x2b4 mm/util.c:520
       ksys_mmap_pgoff+0x3c8/0x5b0 mm/mmap.c:1471
       __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
       __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
       __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&mm->mmap_lock);
                               lock(&ni->file.run_lock#3);
                               lock(&mm->mmap_lock);
  lock(&ni->file.run_lock#3);

 *** DEADLOCK ***

1 lock held by syz-executor393/4220:
 #0: ffff0000ddffab48 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
 #0: ffff0000ddffab48 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x2b4 mm/util.c:518

stack backtrace:
CPU: 0 PID: 4220 Comm: syz-executor393 Not tainted 6.1.80-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2048
 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049
 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
 down_read+0x64/0x308 kernel/locking/rwsem.c:1520
 attr_data_get_block+0x220/0x1bdc fs/ntfs3/attrib.c:903
 ntfs_file_mmap+0x3a4/0x688 fs/ntfs3/file.c:387
 call_mmap include/linux/fs.h:2256 [inline]
 mmap_region+0xdd0/0x1a98 mm/mmap.c:2763
 do_mmap+0xa00/0x1108 mm/mmap.c:1425
 vm_mmap_pgoff+0x1a4/0x2b4 mm/util.c:520
 ksys_mmap_pgoff+0x3c8/0x5b0 mm/mmap.c:1471
 __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
 __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
 __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Crashes (126):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/05 23:03 linux-6.1.y a3eb3a74aa8c f39a7eed .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/09/27 02:21 linux-6.1.y e526b12bf916 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/26 08:10 linux-6.1.y e526b12bf916 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/25 10:54 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/24 06:40 linux-6.1.y e526b12bf916 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/11 05:09 linux-6.1.y 5ca5b389fddf 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/11 05:09 linux-6.1.y 5ca5b389fddf 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/10 16:03 linux-6.1.y 5ca5b389fddf 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/09 23:54 linux-6.1.y 5ca5b389fddf 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/05 07:32 linux-6.1.y 699506173494 dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/08/15 00:21 linux-6.1.y 117ac406ba90 e6b88e20 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/08/11 13:55 linux-6.1.y 36790ef5e00b 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/08/10 09:03 linux-6.1.y 48d525b0e463 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/08/08 07:33 linux-6.1.y 48d525b0e463 de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/08/06 02:34 linux-6.1.y 48d525b0e463 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/07/29 13:59 linux-6.1.y c1cec4dad96b 5187fc86 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/07/25 18:42 linux-6.1.y c18e82d3ee44 466a14e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/07/10 19:16 linux-6.1.y 7753af06eebf 6f7fa383 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/07/09 04:29 linux-6.1.y 7753af06eebf bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/07/05 10:35 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/17 15:10 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/17 04:12 linux-6.1.y eb44d83053d6 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/15 19:34 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/11 05:44 linux-6.1.y 88690811da69 b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/05 14:45 linux-6.1.y 88690811da69 5aa1a7c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/04 11:51 linux-6.1.y 88690811da69 11f2afa5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/06/01 02:28 linux-6.1.y 88690811da69 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/29 05:20 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/22 04:08 linux-6.1.y 4078fa637fcd 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/21 11:22 linux-6.1.y 4078fa637fcd 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/16 22:40 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/16 19:29 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/15 10:37 linux-6.1.y 909ba1f1b414 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/08 16:07 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/06 22:26 linux-6.1.y 909ba1f1b414 fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/04 05:02 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/05/02 23:29 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/30 04:29 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/09/16 19:13 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/09/07 01:00 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/08/19 07:12 linux-6.1.y ee5e09825b81 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/08/16 11:48 linux-6.1.y 117ac406ba90 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/08/15 12:48 linux-6.1.y 117ac406ba90 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/08/14 06:13 linux-6.1.y 36790ef5e00b bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/06/16 11:48 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/05/21 13:18 linux-6.1.y 4078fa637fcd 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/05/09 11:48 linux-6.1.y 909ba1f1b414 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/04/29 13:06 linux-6.1.y dcbc050cb0d3 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/04/29 10:43 linux-6.1.y f2295faba5e8 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/03/29 04:32 linux-6.1.y e3a87a10f259 fc067f05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
* Struck through repros no longer work on HEAD.