Hello,
syzbot found the following issue on:
HEAD commit: c09fbcd31ae6 Linux 6.6.130
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14cf2eda580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=c5b35c4db8465904
dashboard link:
https://syzkaller.appspot.com/bug?extid=6ceeede1c3d0a74e5a6f
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/58165bbf9941/disk-c09fbcd3.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/73cbb84fb36b/vmlinux-c09fbcd3.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/744ea33ec44b/bzImage-c09fbcd3.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+6ceeed...@syzkaller.appspotmail.com
loop0: detected capacity change from 0 to 4096
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.328/6952 is trying to acquire lock:
ffff88805d5a0860 (&ni->ni_lock#3/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1120 [inline]
ffff88805d5a0860 (&ni->ni_lock#3/5){+.+.}-{3:3}, at: ntfs_fallocate+0x7a7/0x1040 fs/ntfs3/file.c:557
but task is already holding lock:
ffff88805d5a0ca0 (mapping.invalidate_lock#3){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:849 [inline]
ffff88805d5a0ca0 (mapping.invalidate_lock#3){++++}-{3:3}, at: ntfs_fallocate+0x3bf/0x1040 fs/ntfs3/file.c:487
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (mapping.invalidate_lock#3){++++}-{3:3}:
down_read+0x46/0x2e0 kernel/locking/rwsem.c:1520
filemap_invalidate_lock_shared include/linux/fs.h:859 [inline]
filemap_fault+0x616/0x15b0 mm/filemap.c:3330
__do_fault+0x13b/0x4d0 mm/memory.c:4244
do_read_fault mm/memory.c:4638 [inline]
do_fault mm/memory.c:4775 [inline]
do_pte_missing mm/memory.c:3689 [inline]
handle_pte_fault mm/memory.c:5047 [inline]
__handle_mm_fault mm/memory.c:5188 [inline]
handle_mm_fault+0x2299/0x4c00 mm/memory.c:5353
do_user_addr_fault+0x730/0x12c0 arch/x86/mm/fault.c:1371
handle_page_fault arch/x86/mm/fault.c:1463 [inline]
exc_page_fault+0x64/0x100 arch/x86/mm/fault.c:1516
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608
do_strncpy_from_user lib/strncpy_from_user.c:-1 [inline]
strncpy_from_user+0xff/0x2d0 lib/strncpy_from_user.c:139
getname_flags+0xf6/0x500 fs/namei.c:151
getname fs/namei.c:219 [inline]
__do_sys_mkdirat fs/namei.c:4159 [inline]
__se_sys_mkdirat fs/namei.c:4157 [inline]
__x64_sys_mkdirat+0x7c/0xa0 fs/namei.c:4157
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #1 (&mm->mmap_lock){++++}-{3:3}:
__might_fault+0xc6/0x120 mm/memory.c:5968
_copy_to_user+0x2a/0xa0 lib/usercopy.c:36
copy_to_user include/linux/uaccess.h:191 [inline]
fiemap_fill_next_extent+0x1de/0x3b0 fs/ioctl.c:145
ni_fiemap+0x3c3/0xca0 fs/ntfs3/frecord.c:1950
ntfs_fiemap+0xdb/0x130 fs/ntfs3/file.c:1220
ioctl_fiemap fs/ioctl.c:220 [inline]
do_vfs_ioctl+0x1505/0x1cc0 fs/ioctl.c:811
__do_sys_ioctl fs/ioctl.c:869 [inline]
__se_sys_ioctl+0x83/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
-> #0 (&ni->ni_lock#3/5){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
ni_lock fs/ntfs3/ntfs_fs.h:1120 [inline]
ntfs_fallocate+0x7a7/0x1040 fs/ntfs3/file.c:557
vfs_fallocate+0x58e/0x700 fs/open.c:324
ksys_fallocate fs/open.c:347 [inline]
__do_sys_fallocate fs/open.c:355 [inline]
__se_sys_fallocate fs/open.c:353 [inline]
__x64_sys_fallocate+0xc1/0x110 fs/open.c:353
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
other info that might help us debug this:
Chain exists of:
&ni->ni_lock#3/5 --> &mm->mmap_lock --> mapping.invalidate_lock#3
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(mapping.invalidate_lock#3);
lock(&mm->mmap_lock);
lock(mapping.invalidate_lock#3);
lock(&ni->ni_lock#3/5);
*** DEADLOCK ***
3 locks held by syz.0.328/6952:
#0: ffff8880774d8418 (sb_writers#14){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2711 [inline]
#0: ffff8880774d8418 (sb_writers#14){.+.+}-{0:0}, at: vfs_fallocate+0x4fb/0x700 fs/open.c:323
#1: ffff88805d5a0b10 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#1: ffff88805d5a0b10 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: ntfs_fallocate+0x2fb/0x1040 fs/ntfs3/file.c:473
#2: ffff88805d5a0ca0 (mapping.invalidate_lock#3){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:849 [inline]
#2: ffff88805d5a0ca0 (mapping.invalidate_lock#3){++++}-{3:3}, at: ntfs_fallocate+0x3bf/0x1040 fs/ntfs3/file.c:487
stack backtrace:
CPU: 0 PID: 6952 Comm: syz.0.328 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
ni_lock fs/ntfs3/ntfs_fs.h:1120 [inline]
ntfs_fallocate+0x7a7/0x1040 fs/ntfs3/file.c:557
vfs_fallocate+0x58e/0x700 fs/open.c:324
ksys_fallocate fs/open.c:347 [inline]
__do_sys_fallocate fs/open.c:355 [inline]
__se_sys_fallocate fs/open.c:353 [inline]
__x64_sys_fallocate+0xc1/0x110 fs/open.c:353
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f151b59c799
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f151c3fd028 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007f151b815fa0 RCX: 00007f151b59c799
RDX: 0000000000004000 RSI: 0000000000000008 RDI: 0000000000000004
RBP: 00007f151b632c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f151b816038 R14: 00007f151b815fa0 R15: 00007ffda6ca5908
</TASK>
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup