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: 424d, last: 4d23h
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 (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in attr_data_get_block ntfs3 C error 2338 23m 587d 0/26 upstream: reported C repro on 2022/10/17 07:43
linux-5.15 possible deadlock in attr_data_get_block origin:lts-only C done 138 5d15h 426d 0/3 upstream: reported C repro on 2023/03/27 15:11
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/14 13:30 1h54m fix candidate upstream job log (0)

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 (83):
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/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/04/24 06:04 linux-6.1.y 6741e066ec76 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/23 09:58 linux-6.1.y 6741e066ec76 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/22 14:09 linux-6.1.y 6741e066ec76 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/14 18:58 linux-6.1.y cd5d98c0556c c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/06 15:56 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/04/06 10:04 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/03/25 13:46 linux-6.1.y d7543167affd 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2024/01/13 05:32 linux-6.1.y 7c58bfa711cb 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/12/21 07:16 linux-6.1.y 4aa6747d9352 de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/12/18 21:51 linux-6.1.y ba6f5fb46511 924661f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/11/18 23:35 linux-6.1.y fb2635ac69ab cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/10/18 22:21 linux-6.1.y adc4d740ad9e 342b9c55 .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 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
2024/04/28 07:30 linux-6.1.y f2295faba5e8 07b455f9 .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/23 16:52 linux-6.1.y 6741e066ec76 21339d7b .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/15 13:44 linux-6.1.y cd5d98c0556c b9af7e61 .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/15 03:42 linux-6.1.y cd5d98c0556c c8349e48 .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/12 18:14 linux-6.1.y bf1e3b1cb1e0 c8349e48 .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/10 03:04 linux-6.1.y 347385861c50 171ec371 .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/07 22:38 linux-6.1.y 347385861c50 ca620dd8 .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/04 09:59 linux-6.1.y 347385861c50 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2024/03/12 13:07 linux-6.1.y 61adba85cc40 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/11/01 08:38 linux-6.1.y 32c9cdbe383c 69904c9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/10/12 22:22 linux-6.1.y 082280fe94a0 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/09/28 21:34 linux-6.1.y d23900f974e0 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/08/31 22:31 linux-6.1.y a2943d2d9a00 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/08/19 08:52 linux-6.1.y 6c44e13dc284 d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/07/10 16:25 linux-6.1.y 61fd484b2cf6 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/04/05 10:56 linux-6.1.y 3b29299e5f60 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/04/03 20:01 linux-6.1.y 3b29299e5f60 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in attr_data_get_block
2023/04/03 08:24 linux-6.1.y 3b29299e5f60 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan 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
2023/08/26 06:49 linux-6.1.y 802aacbbffe2 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/08/24 20:40 linux-6.1.y 802aacbbffe2 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/08/02 19:31 linux-6.1.y d2a6dc4eaf6d b178af49 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/07/11 17:36 linux-6.1.y 61fd484b2cf6 2f19aa4f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/20 21:07 linux-6.1.y f17b0ab65d17 a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/18 20:38 linux-6.1.y 0102425ac76b d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/18 18:18 linux-6.1.y 0102425ac76b d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/18 17:53 linux-6.1.y 0102425ac76b d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/16 10:13 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/14 19:26 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/14 16:43 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/09 00:22 linux-6.1.y 543aff194ab6 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
2023/04/01 00:13 linux-6.1.y 3b29299e5f60 f325deb0 .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 10:42 linux-6.1.y e3a87a10f259 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in attr_data_get_block
* Struck through repros no longer work on HEAD.