program: syz_mount_image$hfs(&(0x7f0000000000), &(0x7f0000000040)='./file1\x00', 0x30000c8, &(0x7f0000000080)=ANY=[], 0x11, 0x2e6, &(0x7f00000000c0)="$eJzs3b9u02oYx/Hf66RNelr1uKc9QmIsVIIFQVkQSxDKxBUwIaAJUkVUBBTxZyqICSHY2Ri4BS6CBcQNwMTEBZTJ6H1tx0n8J25JY6J+P1Ir2/FjP2/873kqVRaAY+tq+9uHiz/sj5FqqkmvLkuepKZUl/S/TjQf7exu7/a6naIN1VyE/TEKI01qna2dblaojXMREd/O1bU0uCy0eLhBIlcQBFe+V50EKueu/gye1NB8Mt+cYk5lPD9k3N6E85g1Zl/7eqLlqvMAAFQrev57YSWvpah+9zxpI3rsu/rgb3v+H1AjntivNo8pCAo/HXj+uy4rMPb4/us+Svo918LZz724Syyz57mReVc+eiMFphnXVbpcvIU7273uua17vY6nF2pFBlZbc7874akbG8o23YeuZywrUGLsJruidP2qN2fHsBnm/1jSUP6rh9xjStkr03wyX8wN4+udOv36rx4Ye5jckfJHjpRn57rn87foRunbUSr6ulutlje0yorbyUkNthLjRtnM7kgUn1ErGv4DgcugKE8X9d9IVHh0LoyJWs2M2ozncqLWhqLsaPpnc/7+jpp5Y66bdf3UR7UH6n/P5rehwiszuWrMRnjCuW88HM989u7qbpt+6vxMXy79b7GRl/qv0XvatfdB8W0OeV7rti5p+eHTZ3drvV73gZ24lTFxf6m/ZO6llLnOwSbswf+D8IwN7iVLGgqc1MrxQ2lSOy0zcXaiG7T3j7Er26tsegM8rhPtz0d1Ii1Ep2n1I63w3oSpSQ561ZmgIrbuMmH/l/Qr9bDYs7/8zDo9t90YLoajLQa2xu53cElsEFbkkv4p6ODSFvM7uHTPleoZXc916ox0uvwe/SjPWWYGCvi2vuomf/8HAAAAAAAAAAAAAAAAAACYNdP4d4KqxwgAAAAAAAAAAAAAAAAAAAAAwKzrv/9X8ft/Ve79v6PvXZnk+3/f7ij7/b+xnHfNADiQ3wEAAP//NVZ57Q==") prlimit64(0x0, 0xe, &(0x7f0000000080)={0x8, 0x420000008b}, 0x0) sched_setscheduler(0x0, 0x2, &(0x7f00000004c0)=0x7) (async, rerun: 32) mkdirat(0xffffffffffffff9c, &(0x7f0000000500)='./debug\x00', 0x1ff) (async, rerun: 32) mount(0x0, &(0x7f0000000540)='./debug\x00', &(0x7f0000000580)='debugfs\x00', 0x0, 0x0) (async) r0 = openat(0xffffffffffffff9c, &(0x7f00000005c0)='./debug/dynamic_debug/control\x00', 0x2, 0x0) write(r0, &(0x7f0000000600)='+p', 0x2) (async) r1 = socket$inet_sctp(0x2, 0x1, 0x84) setsockopt$IP_VS_SO_SET_ADD(r1, 0x0, 0x482, &(0x7f0000000640)={0x84, @dev={0xac, 0x14, 0x14, 0x9}, 0x15, 0x3, 'sed\x00', 0x0, 0x7, 0x80000072}, 0x2c) (async, rerun: 64) r2 = socket$inet_sctp(0x2, 0x5, 0x84) (rerun: 64) setsockopt$IP_VS_SO_SET_ADDDEST(r2, 0x0, 0x487, &(0x7f0000000680)={{0x84, @private=0xa010101, 0x4e21, 0x3, 'lc\x00', 0x5, 0x8, 0x75}, {@remote, 0x4e20, 0x10000, 0xc, 0x2}}, 0x44) (async) r3 = socket$nl_netfilter(0x10, 0x3, 0xc) sendmsg$IPCTNL_MSG_CT_NEW(r3, &(0x7f0000000700)={0x0, 0x0, &(0x7f0000000740)={&(0x7f0000000780)=ANY=[@ANYBLOB="9c000000000101060000000000000000020000003400018014000180080001007f000001080002007f0000011c0002800500010011000000060002004e2000000600030006b700003400028014000180080001007f000001080002007f0000011c00028005000100110000000600020006b70000060003004e20000008000700000003e80c00058008000100524153"], 0x9c}}, 0x0) syz_mount_image$ext4(&(0x7f0000000900)='ext4\x00', &(0x7f0000000940)='./mnt\x00', 0x0, &(0x7f0000000980)={[{@jqfmt_vfsold}, {@bh}]}, 0x1, 0x236, &(0x7f00000009c0)="$eJzs3TFoM2UcBvDnLomf/b4gVRdBUEFEtFDqJrjURaEgpYgIKlREXJRWqC1urZOLg84qnVyKuFkdpUtxUQSnqh3qImhxsDjoELlcK9VGFFNz8t3vB5fcJe97//e4e95kOS5Aa00nmU/SSTKTpJekON/grnqZPt3cntpfTgaDx38shu3q7dpZv2tJtpI8mGSvLPJiN9nYffro54NH731jvXfPe7tPTU30IE8dHx0+dvLu4usfLjyw8fmX3y8WmU//D8d1+YoRn3WL5Jb/otj/RNFtegT8E0uvfvBVlftbk9w9zH8vZeqT9+baDXu93P/OX/V964cvbp/kWIHLNxj0qt/ArQHQOmWSfopyNkm9Xpazs/V/+K87V8uXVtdemXlhdX3l+aZnKuCy9JPDRz6+8tG1P+X/u06df+D6VeX/iaWdb6r1k07TowEmqcr/zLOb90X+oXXkH9pL/qG95B/aS/6hveQf2kv+ob3kH9pL/qG95B/a63z+AYB2GVxp+g5koClNzz8AAAAAAAAAAAAAAAAAAMBF21P7y2fLpGp++nZy/HCS7qj6neHziJMbh69XfyqqZr8r6m5jeebOMXcwpvcbvvv6pm+brf/ZHc3W31xJtl5LMtftXrz+itPr79+7+W++7z03ZoExPfRks/V/3Wm2/sJB8kk1/8yNmn/K3DZ8Hz3/9KvzN2b9l38ZcwcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMzG8BAAD//8n0bSk=") perf_event_open(&(0x7f0000000c00)={0x2, 0x80, 0x97, 0x2, 0x0, 0x0, 0x0, 0xa, 0x8018, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10000, 0x4, @perf_config_ext={0x10, 0x401}, 0x14420, 0x42, 0x7, 0x0, 0x8000000002, 0xfffffffc, 0x25a, 0x0, 0x0, 0x0, 0x9}, 0x0, 0x0, 0xffffffffffffffff, 0xb) r4 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f0000000c80)='memory.events\x00', 0x275a, 0x0) write$binfmt_script(r4, &(0x7f0000000cc0), 0xfecc) (async) r5 = socket$inet_udp(0x2, 0x2, 0x0) bind$inet(r5, &(0x7f0000000840)={0x2, 0x4e20, @loopback}, 0x10) (async) sendto$inet(r5, &(0x7f0000000880)="280000010000007f00000106b7", 0xd, 0x0, &(0x7f00000008c0)={0x2, 0x6b7, @loopback}, 0x10) (async, rerun: 64) prlimit64(0x0, 0xe, &(0x7f00000003c0)={0x8, 0x100008b}, 0x0) (rerun: 64) sched_setscheduler(0x0, 0x2, &(0x7f0000000400)=0xfffffffc) (async) r6 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f0000000440)='memory.stat\x00', 0x275a, 0x0) write$binfmt_script(r6, &(0x7f0000000480), 0x208e24b) mkdirat(0xffffffffffffff9c, &(0x7f0000000d00)='./tracing\x00', 0x0) (async) mount(0x0, &(0x7f0000000d40)='./tracing\x00', &(0x7f0000000d80)='tracefs\x00', 0x0, 0x0) (async, rerun: 32) openat(0xffffffffffffff9c, &(0x7f0000000dc0)='./tracing/events/sched/filter\x00', 0x1, 0x15d) (async, rerun: 32) mkdirat(0xffffffffffffff9c, &(0x7f0000000e00)='./proc\x00', 0x161) (async, rerun: 32) mount(0x0, &(0x7f0000000e40)='./proc\x00', &(0x7f0000000e80)='proc\x00', 0x4000, 0x0) (async, rerun: 32) openat(0xffffffffffffff9c, &(0x7f0000000ec0)='./proc/thread-self/fail-nth\x00', 0x20002, 0x0) [ 103.299999][ T5301] Bluetooth: hci0: command tx timeout [ 103.416154][ T5343] loop0: detected capacity change from 0 to 64 [ 103.432806][ T5343] ======================================================= [ 103.432806][ T5343] WARNING: The mand mount option has been deprecated and [ 103.432806][ T5343] and is ignored by this kernel. Remove the mand [ 103.432806][ T5343] option from the mount to silence this warning. [ 103.432806][ T5343] ======================================================= [ 103.631537][ T5343] netlink: 12 bytes leftover after parsing attributes in process `syz.0.0'. [ 103.688817][ T5343] [ 103.694201][ T5343] ============================================ [ 103.697170][ T5343] WARNING: possible recursive locking detected [ 103.699864][ T5343] syzkaller #0 Not tainted [ 103.701842][ T5343] -------------------------------------------- [ 103.704558][ T5343] syz.0.0/5343 is trying to acquire lock: [ 103.707016][ T5343] ffff8880547800a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 103.711917][ T5343] [ 103.711917][ T5343] but task is already holding lock: [ 103.715799][ T5343] ffff88805477ba20 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 103.721573][ T5343] [ 103.721573][ T5343] other info that might help us debug this: [ 103.725177][ T5343] Possible unsafe locking scenario: [ 103.725177][ T5343] [ 103.728398][ T5343] CPU0 [ 103.729839][ T5343] ---- [ 103.731215][ T5343] lock(&HFS_I(tree->inode)->extents_lock); [ 103.733772][ T5343] lock(&HFS_I(tree->inode)->extents_lock); [ 103.736457][ T5343] [ 103.736457][ T5343] *** DEADLOCK *** [ 103.736457][ T5343] [ 103.740790][ T5343] May be due to missing lock nesting notation [ 103.740790][ T5343] [ 103.744878][ T5343] locks held by syz.0.0/5343: 5, on CPU#0: [ 103.748026][ T5343] #0: ffff888038104478 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 [ 103.751961][ T5343] #1: ffff88805477b600 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: filename_create+0x200/0x370 [ 103.756939][ T5343] #2: ffff8880350f60a8 (&tree->tree_lock){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 103.761657][ T5343] #3: ffff88805477ba20 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 103.766433][ T5343] #4: ffff8880350f20a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 103.770323][ T5343] [ 103.770323][ T5343] stack backtrace: [ 103.772863][ T5343] CPU: 0 UID: 0 PID: 5343 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 103.777368][ T5343] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 103.782477][ T5343] Call Trace: [ 103.784296][ T5343] [ 103.785608][ T5343] dump_stack_lvl+0xe8/0x150 [ 103.787759][ T5343] print_deadlock_bug+0x27a/0x290 [ 103.789916][ T5343] __lock_acquire+0x25db/0x2de0 [ 103.792362][ T5343] ? rcu_is_watching+0x16/0xb0 [ 103.794956][ T5343] ? __kasan_check_byte+0x12/0x40 [ 103.800094][ T5343] ? rcu_is_watching+0x16/0xb0 [ 103.802637][ T5343] ? lock_release+0x4b/0x3c0 [ 103.804968][ T5343] ? lock_release+0x4b/0x3c0 [ 103.807438][ T5343] lock_acquire+0x115/0x350 [ 103.809640][ T5343] ? hfs_extend_file+0xf9/0x1680 [ 103.811859][ T5343] __mutex_lock+0x197/0x15a0 [ 103.813982][ T5343] ? hfs_extend_file+0xf9/0x1680 [ 103.816082][ T5343] ? stack_trace_save+0xa9/0x100 [ 103.818125][ T5343] ? __pfx_stack_trace_save+0x10/0x10 [ 103.820321][ T5343] ? hfs_extend_file+0xf9/0x1680 [ 103.822280][ T5343] ? __pfx___mutex_lock+0x10/0x10 [ 103.824509][ T5343] ? lockdep_unlock+0x5c/0xd0 [ 103.826500][ T5343] ? __lock_acquire+0x1511/0x2de0 [ 103.828558][ T5343] hfs_extend_file+0xf9/0x1680 [ 103.830345][ T5343] ? __pfx_hfs_extend_file+0x10/0x10 [ 103.832517][ T5343] ? __mutex_trylock_common+0x15f/0x270 [ 103.834823][ T5343] ? __pfx___mutex_trylock_common+0x10/0x10 [ 103.837488][ T5343] ? rcu_is_watching+0x16/0xb0 [ 103.839701][ T5343] ? __asan_memset+0x22/0x50 [ 103.841807][ T5343] ? hfs_brec_find+0x19a/0x510 [ 103.844043][ T5343] hfs_bmap_reserve+0x108/0x430 [ 103.846412][ T5343] __hfs_ext_write_extent+0x200/0x620 [ 103.848790][ T5343] ? __kmalloc_noprof+0x1a6/0x710 [ 103.851096][ T5343] ? hfs_find_init+0x9d/0x300 [ 103.853078][ T5343] __hfs_ext_cache_extent+0x6e/0x9b0 [ 103.855259][ T5343] ? hfs_find_init+0x18d/0x300 [ 103.857286][ T5343] hfs_extend_file+0x3ad/0x1680 [ 103.859386][ T5343] ? __pfx___mutex_trylock_common+0x10/0x10 [ 103.861898][ T5343] ? __pfx_hfs_extend_file+0x10/0x10 [ 103.864215][ T5343] ? __mutex_lock+0x305/0x15a0 [ 103.866290][ T5343] ? hfs_find_init+0x18d/0x300 [ 103.868346][ T5343] ? __pfx___mutex_lock+0x10/0x10 [ 103.870480][ T5343] ? rcu_is_watching+0x16/0xb0 [ 103.872839][ T5343] ? trace_kmalloc+0x2a/0xf0 [ 103.875069][ T5343] hfs_bmap_reserve+0x108/0x430 [ 103.877326][ T5343] hfs_cat_create+0x23d/0x870 [ 103.879571][ T5343] ? __pfx_hfs_cat_create+0x10/0x10 [ 103.881945][ T5343] ? _raw_spin_unlock+0x28/0x50 [ 103.884129][ T5343] ? hfs_new_inode+0x83e/0xcc0 [ 103.886217][ T5343] hfs_mkdir+0x73/0xe0 [ 103.888046][ T5343] vfs_mkdir+0x411/0x660 [ 103.889985][ T5343] filename_mkdirat+0x284/0x550 [ 103.892214][ T5343] ? __might_fault+0xaf/0x130 [ 103.894372][ T5343] ? __pfx_filename_mkdirat+0x10/0x10 [ 103.896754][ T5343] ? do_getname+0x151/0x250 [ 103.898782][ T5343] __se_sys_mkdirat+0x35/0x150 [ 103.900817][ T5343] do_syscall_64+0x171/0x540 [ 103.902796][ T5343] ? trace_irq_disable+0x3b/0x140 [ 103.905083][ T5343] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 103.907753][ T5343] ? clear_bhb_loop+0x70/0xc0 [ 103.909839][ T5343] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 103.912472][ T5343] RIP: 0033:0x7f8bf6ba9559 [ 103.914363][ T5343] 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 [ 103.922272][ T5343] RSP: 002b:00007f8bf7b07fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 [ 103.925579][ T5343] RAX: ffffffffffffffda RBX: 00007f8bf6e25fa0 RCX: 00007f8bf6ba9559 [ 103.928874][ T5343] RDX: 0000000000000161 RSI: 0000200000000e00 RDI: ffffffffffffff9c [ 103.932645][ T5343] RBP: 00007f8bf6c38136 R08: 0000000000000000 R09: 0000000000000000 [ 103.936046][ T5343] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 103.939353][ T5343] R13: 00007f8bf6e26038 R14: 00007f8bf6e25fa0 R15: 00007ffd5b8c9878 [ 103.942723][ T5343] [ 103.960039][ T5343] syz.0.0: attempt to access beyond end of device [ 103.960039][ T5343] loop0: rw=8388608, sector=66, nr_sectors = 1 limit=64 [ 103.960063][ T5343] Buffer I/O error on dev loop0, logical block 66, async page read [ 103.960073][ T5343] syz.0.0: attempt to access beyond end of device [ 103.960073][ T5343] loop0: rw=8388608, sector=67, nr_sectors = 1 limit=64 [ 103.960085][ T5343] Buffer I/O error on dev loop0, logical block 67, async page read [ 103.960095][ T5343] syz.0.0: attempt to access beyond end of device [ 103.960095][ T5343] loop0: rw=8388608, sector=68, nr_sectors = 1 limit=64 [ 103.960105][ T5343] Buffer I/O error on dev loop0, logical block 68, async page read [ 103.960115][ T5343] syz.0.0: attempt to access beyond end of device [ 103.960115][ T5343] loop0: rw=8388608, sector=69, nr_sectors = 1 limit=64 [ 103.960125][ T5343] Buffer I/O error on dev loop0, logical block 69, async page read [ 103.960135][ T5343] syz.0.0: attempt to access beyond end of device [ 103.960135][ T5343] loop0: rw=8388608, sector=70, nr_sectors = 1 limit=64 [ 103.960146][ T5343] Buffer I/O error on dev loop0, logical block 70, async page read [ 104.064455][ T182] IPVS: starting estimator thread 0... [ 104.064934][ T1067] kworker/u4:12: attempt to access beyond end of device [ 104.064934][ T1067] loop0: rw=8388609, sector=64, nr_sectors = 1 limit=64 [ 104.064951][ T1067] Buffer I/O error on dev loop0, logical block 64, lost async page write [ 104.064958][ T1067] kworker/u4:12: attempt to access beyond end of device [ 104.064958][ T1067] loop0: rw=8388609, sector=65, nr_sectors = 1 limit=64 [ 104.064971][ T1067] Buffer I/O error on dev loop0, logical block 65, lost async page write