Hello,
syzbot found the following issue on:
HEAD commit: 0bbbd97a442d Linux 6.6.112
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14ecb5e2580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link:
https://syzkaller.appspot.com/bug?extid=118252a326fb17e89c6d
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=125a4b04580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=135c8492580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/7e387d57d751/disk-0bbbd97a.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/810d42505365/vmlinux-0bbbd97a.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/5d2fe115c227/bzImage-0bbbd97a.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/df2cecc9d809/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+118252...@syzkaller.appspotmail.com
syz.0.17[5948]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop0: detected capacity change from 0 to 1024
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.17/5948 is trying to acquire lock:
ffff888026410108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1fd/0x1990 fs/hfsplus/extents.c:455
but task is already holding lock:
ffff8880264122c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1fd/0x1990 fs/hfsplus/extents.c:455
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&HFSPLUS_I(inode)->extents_lock);
lock(&HFSPLUS_I(inode)->extents_lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by syz.0.17/5948:
#0: ffff8880798d8418 (sb_writers#13){.+.+}-{0:0}, at: vfs_write+0x20e/0x940 fs/read_write.c:580
#1: ffff8880264124d0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#1: ffff8880264124d0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: generic_file_write_iter+0x83/0x2e0 mm/filemap.c:4134
#2: ffff8880264122c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1fd/0x1990 fs/hfsplus/extents.c:455
#3: ffff8880798da0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x154/0x1d0 fs/hfsplus/bfind.c:28
stack backtrace:
CPU: 1 PID: 5948 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain kernel/locking/lockdep.c:3856 [inline]
__lock_acquire+0x5d40/0x7c80 kernel/locking/lockdep.c:5137
lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x129/0xcc0 kernel/locking/mutex.c:747
hfsplus_file_extend+0x1fd/0x1990 fs/hfsplus/extents.c:455
hfsplus_bmap_reserve+0x122/0x500 fs/hfsplus/btree.c:358
__hfsplus_ext_write_extent+0x28d/0x5b0 fs/hfsplus/extents.c:104
__hfsplus_ext_cache_extent+0x89/0xe20 fs/hfsplus/extents.c:186
hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
hfsplus_file_extend+0x445/0x1990 fs/hfsplus/extents.c:459
hfsplus_get_block+0x412/0x1530 fs/hfsplus/extents.c:245
__block_write_begin_int+0x566/0x1ad0 fs/buffer.c:2124
__block_write_begin fs/buffer.c:2173 [inline]
block_write_begin+0x9a/0x1e0 fs/buffer.c:2234
cont_write_begin+0x5c8/0x7e0 fs/buffer.c:2591
hfsplus_write_begin+0x8b/0xd0 fs/hfsplus/inode.c:52
cont_expand_zero fs/buffer.c:2518 [inline]
cont_write_begin+0x2ad/0x7e0 fs/buffer.c:2581
hfsplus_write_begin+0x8b/0xd0 fs/hfsplus/inode.c:52
generic_perform_write+0x2fb/0x5b0 mm/filemap.c:4016
generic_file_write_iter+0xaf/0x2e0 mm/filemap.c:4137
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x43b/0x940 fs/read_write.c:584
ksys_pwrite64 fs/read_write.c:699 [inline]
__do_sys_pwrite64 fs/read_write.c:709 [inline]
__se_sys_pwrite64 fs/read_write.c:706 [inline]
__x64_sys_pwrite64+0x195/0x220 fs/read_write.c:706
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7efdf1b8eec9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcb839f878 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007efdf1de5fa0 RCX: 00007efdf1b8eec9
RDX: 0000000000000001 RSI: 00002000000005c0 RDI: 0000000000000004
RBP: 00007efdf1c11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000004fed0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efdf1de5fa0 R14: 00007efdf1de5fa0 R15: 0000000000000004
</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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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