program: syz_mount_image$hfs(&(0x7f0000000200), &(0x7f0000000340)='./file0\x00', 0x0, &(0x7f0000000380)=ANY=[@ANYBLOB="71756965742c636f6465706167653d63703836302c696f636861727365743d63703836312c00808fead042bd35dc78f7f06333a5e7165b8271e41aee85e59cbb6c2df3d4e4c16b06c73f2e3b348a7fba46e286378a15ee516bac8d4813c9c3d9cee1ddb95d1bbcf504e065b3749a1cbd841e685a558598cf0db10b55885946e678d0a71877037a090000000700848879ef1604cadc1faca3aa22a576750d559c4e124d4cb7293e7393b77286a03d342382e84d6d3c29ab95cc923fbe25e134d1c421320a3bffaa17fcd6b5178e322cc47133b3811e3d3bc34998dc7ed029834ad591d9d55141063d8de2d50a4fa0e73ff2913a9fe8e954a4e4ca99ce24dba4e0812c2ccf8ab5737e57193c5f47fd63b16c8b34f256dbac0e5ebd009078df2cb1ca1051ad091adbfee5126d8a59fa5438734bc3e8cc7b7edc10716a0ace21dc04bd9c3248b598267822670a02be81f017e946a7e3359ce433ae42aae07518c3850cff4cf415bdb29ab165216a12899868d6857b732eafbab59fba36fca0b5cab2e717cd6ffef31a24add5f56b30c27b9e616892b60f4cde07eb9cb090ca25e5b8c6858a27e7e4d5cac6ed29218fcd35804fe2a5cb1ca503991051eb9c04a88bf02e8e240ee4c8b0ae80396aff9f8a913e8dc6b15e15b0a7c82953a87ef02b1e7abea95a7ae79eca2a536a59abfa3cccc1a6664d20344fedc524f3867f1dd8ba04bcd90aa43e024891f779210ec076e0b13ebf2bef2ac1a30f7a396a508b00000000000000", @ANYRESOCT=0x0, @ANYRESOCT, @ANYRESDEC=0x0, @ANYRES16=0x0, @ANYRES8], 0x1, 0x32a, &(0x7f00000007c0)="$eJzs3U1rE08cB/DvTJJm+2/+dfsggsdqQS+i9SJeIpK3IIgH0bYRiqGiVlAvJuJJRO/efQu+CC+Kb0BPHsSr0F4cmdnZTXZ39iFt2jX6/YC42d3J/CYzk/1NUAZE9M+62vny7uI3/UcANdSAl5cBCcAD6gCO44T3aHtna6fX3cx7o5opgT0FgaCkSN2zsd01fw/ip3U5U8Ly9as6WqPn6HAopa58TZz7LisKhipjZr+DBJp2dprr3pFHlm9Q5ibHeO4fQizTROxiF48xX3UcRERULf38HwRPSv2cb9n8XUpgFRh4f+rzv5z/U2d+VhLHUVK5V0ee/2aVpYTu32Pm0nC9Z5Zw+roMV4llam4kXs8gyMFiCaZwryqHSz4Ti5y9s9Xrntu419uUeI62NVJgOarB0iO0INoVx9o0R4m2C2dGGYQlG7oNaxnxL+2zxhypdDfWIeKD+CRuCh9vsRnlf3UldLQmYD/RU0H857PrmzOl9F2wXxvtdluaNwotmEpOxnsqu5VmFHjuFQnCD3YB8R8I/KI4TanFRKmgdRecBZpRqSVnqbXwVUZdy7FSujXRaM6OcjLUs6wr4rW4LlbwA+/RGcn/pY5vFemZOdIJw1kjVoOJZj7xoD0z7urq5j391JOjjxut+JnoU2xmhb6nBH8SOqCwD19hHZcw//DJ07u1Xq/7QB/cdhzcb0VnGi8A5z0VH6A/PNOEMlI3h9+BseKz9uQYldbGCOzsRFuqJ2LhzXqWJS+FrZzoJz86EsIJO7E+hax+aOWNjc7HxEAqPFC1cnNHNZ0j3C/u94xLv9Q+2p7Ol+nvNOz0qiOhiui8SwTrP5PJ23zf5Gs6W7jWzF6NhItMV8pmEkf7jkrn2NEKyIuVXzRH/8XT6IIV0JzNYxzruD5Say797E+tuU6dAU6Xr9G3cU6H7PTfEh18xi3+/k9ERERERERERERERERERERERERENG3G/98Rs2OWavBflhMRERERERERERERERERERERERERERERHVC0/y/C/X9Rbv/f5PZSdv9fDwX7/66nY0jt//tmG6IPcP9fosP1OwAA//+1UnIe") prlimit64(0x0, 0xe, &(0x7f0000000b00)={0x8, 0x20000008b}, 0x0) sched_setscheduler(0x0, 0x1, &(0x7f0000000b40)=0x7) r0 = openat(0xffffffffffffff9c, &(0x7f0000000b80)='./file1\x00', 0x42, 0x0) write$FUSE_WRITE(r0, &(0x7f0000000bc0)={0x18}, 0xfffffdef) ioctl$FIBMAP(r0, 0x1, &(0x7f0000000c00)=0x101) r1 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f00000006c0)='memory.events\x00', 0x275a, 0x0) write$cgroup_subtree(r1, &(0x7f0000000e00)=ANY=[], 0x10448) [ 137.490615][ T5311] Bluetooth: hci0: command tx timeout [ 137.695944][ T5353] loop0: detected capacity change from 0 to 64 [ 138.588985][ T5353] syz.0.0: attempt to access beyond end of device [ 138.588985][ T5353] loop0: rw=8388608, sector=25900, nr_sectors = 1 limit=64 [ 138.589092][ T5353] Buffer I/O error on dev loop0, logical block 25900, async page read [ 138.589122][ T5353] syz.0.0: attempt to access beyond end of device [ 138.589122][ T5353] loop0: rw=8388608, sector=25901, nr_sectors = 1 limit=64 [ 138.589135][ T5353] Buffer I/O error on dev loop0, logical block 25901, async page read [ 138.589148][ T5353] syz.0.0: attempt to access beyond end of device [ 138.589148][ T5353] loop0: rw=8388608, sector=26983, nr_sectors = 1 limit=64 [ 138.589161][ T5353] Buffer I/O error on dev loop0, logical block 26983, async page read [ 138.589174][ T5353] syz.0.0: attempt to access beyond end of device [ 138.589174][ T5353] loop0: rw=8388608, sector=26984, nr_sectors = 1 limit=64 [ 138.589187][ T5353] Buffer I/O error on dev loop0, logical block 26984, async page read [ 138.589199][ T5353] syz.0.0: attempt to access beyond end of device [ 138.589199][ T5353] loop0: rw=8388608, sector=26985, nr_sectors = 1 limit=64 [ 138.589211][ T5353] Buffer I/O error on dev loop0, logical block 26985, async page read [ 138.589225][ T5353] syz.0.0: attempt to access beyond end of device [ 138.589225][ T5353] loop0: rw=8388608, sector=26986, nr_sectors = 1 limit=64 [ 138.589237][ T5353] Buffer I/O error on dev loop0, logical block 26986, async page read [ 138.705822][ T72] kworker/u4:5: attempt to access beyond end of device [ 138.705822][ T72] loop0: rw=8388609, sector=161, nr_sectors = 1 limit=64 [ 138.705848][ T72] Buffer I/O error on dev loop0, logical block 161, lost async page write [ 138.705872][ T72] kworker/u4:5: attempt to access beyond end of device [ 138.705872][ T72] loop0: rw=8388609, sector=162, nr_sectors = 1 limit=64 [ 138.705885][ T72] Buffer I/O error on dev loop0, logical block 162, lost async page write [ 138.705897][ T72] kworker/u4:5: attempt to access beyond end of device [ 138.705897][ T72] loop0: rw=8388609, sector=163, nr_sectors = 1 limit=64 [ 138.705910][ T72] Buffer I/O error on dev loop0, logical block 163, lost async page write [ 138.705921][ T72] kworker/u4:5: attempt to access beyond end of device [ 138.705921][ T72] loop0: rw=8388609, sector=167, nr_sectors = 1 limit=64 [ 138.705934][ T72] Buffer I/O error on dev loop0, logical block 167, lost async page write qemu-system-x86_64: ahci: PRDT length for NCQ command (0x0) is smaller than the requested size (0x153000) [ 138.989999][ T5353] [ 138.991241][ T5353] ============================================ [ 138.996679][ T5353] WARNING: possible recursive locking detected [ 138.999638][ T5353] syzkaller #0 Not tainted [ 139.001882][ T5353] -------------------------------------------- [ 139.004969][ T5353] syz.0.0/5353 is trying to acquire lock: [ 139.007826][ T5353] ffff8880133720a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 139.012803][ T5353] [ 139.012803][ T5353] but task is already holding lock: [ 139.016444][ T5353] ffff8880133720a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 139.021433][ T5353] [ 139.021433][ T5353] other info that might help us debug this: [ 139.025516][ T5353] Possible unsafe locking scenario: [ 139.025516][ T5353] [ 139.029388][ T5353] CPU0 [ 139.031221][ T5353] ---- [ 139.032983][ T5353] lock(&tree->tree_lock/1); [ 139.035373][ T5353] lock(&tree->tree_lock/1); [ 139.037851][ T5353] [ 139.037851][ T5353] *** DEADLOCK *** [ 139.037851][ T5353] [ 139.042384][ T5353] May be due to missing lock nesting notation [ 139.042384][ T5353] [ 139.046776][ T5353] locks held by syz.0.0/5353: 6, on CPU#0: [ 139.049904][ T5353] #0: ffff888036c252b0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x118/0x160 [ 139.054405][ T5353] #1: ffff888035b34478 (sb_writers#12){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 [ 139.058929][ T5353] #2: ffff888013392a80 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: generic_file_write_iter+0x82/0x330 [ 139.064687][ T5353] #3: ffff8880133928e0 (&HFS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfs_file_truncate+0x39b/0xb70 [ 139.069305][ T5353] #4: ffff8880133720a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 139.073281][ T5353] #5: ffff8880133a40a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 139.078131][ T5353] [ 139.078131][ T5353] stack backtrace: [ 139.080980][ T5353] CPU: 0 UID: 0 PID: 5353 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 139.085235][ T5353] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 139.089962][ T5353] Call Trace: [ 139.091465][ T5353] [ 139.092875][ T5353] dump_stack_lvl+0xe8/0x150 [ 139.095122][ T5353] print_deadlock_bug+0x27a/0x290 [ 139.097599][ T5353] __lock_acquire+0x25db/0x2de0 [ 139.100017][ T5353] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 139.102772][ T5353] ? stack_depot_save_flags+0x404/0x810 [ 139.105418][ T5353] ? kasan_save_track+0x51/0x90 [ 139.107801][ T5353] ? kasan_save_track+0x3f/0x90 [ 139.110173][ T5353] ? __kasan_kmalloc+0x93/0xb0 [ 139.112470][ T5353] ? __kmalloc_noprof+0x366/0x710 [ 139.114649][ T5353] ? hfs_find_init+0x9d/0x300 [ 139.116576][ T5353] ? hfs_extend_file+0x367/0x1680 [ 139.118773][ T5353] ? hfs_bmap_reserve+0x108/0x430 [ 139.121275][ T5353] ? __hfs_ext_write_extent+0x200/0x620 [ 139.123852][ T5353] lock_acquire+0x115/0x350 [ 139.126025][ T5353] ? hfs_find_init+0x18d/0x300 [ 139.128286][ T5353] __mutex_lock+0x197/0x15a0 [ 139.130505][ T5353] ? hfs_find_init+0x18d/0x300 [ 139.132813][ T5353] ? hfs_find_init+0x18d/0x300 [ 139.134977][ T5353] ? __pfx___mutex_lock+0x10/0x10 [ 139.137279][ T5353] ? rcu_is_watching+0x16/0xb0 [ 139.139523][ T5353] ? trace_kmalloc+0x2a/0xf0 [ 139.141636][ T5353] ? __kmalloc_noprof+0x387/0x710 [ 139.143850][ T5353] ? __kmalloc_noprof+0x1a6/0x710 [ 139.146129][ T5353] ? hfs_find_init+0x9d/0x300 [ 139.148263][ T5353] hfs_find_init+0x18d/0x300 [ 139.150727][ T5353] hfs_extend_file+0x367/0x1680 [ 139.153230][ T5353] ? __asan_memcpy+0x40/0x70 [ 139.155413][ T5353] ? __pfx_hfs_extend_file+0x10/0x10 [ 139.157883][ T5353] ? __hfs_brec_find+0x335/0x510 [ 139.160323][ T5353] ? do_raw_spin_unlock+0x4d/0x200 [ 139.162571][ T5353] ? hfs_brec_find+0x3cc/0x510 [ 139.164639][ T5353] hfs_bmap_reserve+0x108/0x430 [ 139.166735][ T5353] __hfs_ext_write_extent+0x200/0x620 [ 139.169001][ T5353] ? __kmalloc_noprof+0x1a6/0x710 [ 139.171210][ T5353] ? hfs_find_init+0x9d/0x300 [ 139.173356][ T5353] __hfs_ext_cache_extent+0x6e/0x9b0 [ 139.175602][ T5353] ? hfs_find_init+0x18d/0x300 [ 139.177693][ T5353] hfs_file_truncate+0x4e6/0xb70 [ 139.179830][ T5353] ? __pfx_hfs_file_truncate+0x10/0x10 [ 139.182113][ T5353] ? __pfx_unmap_mapping_range+0x10/0x10 [ 139.184453][ T5353] hfs_write_begin+0x178/0x1c0 [ 139.186477][ T5353] generic_perform_write+0x2d5/0x8e0 [ 139.188731][ T5353] ? __pfx_generic_perform_write+0x10/0x10 [ 139.191444][ T5353] ? file_update_time_flags+0x1e0/0x440 [ 139.194016][ T5353] ? __generic_file_write_iter+0xf9/0x230 [ 139.196565][ T5353] ? generic_file_write_iter+0x9a/0x330 [ 139.199048][ T5353] generic_file_write_iter+0xae/0x330 [ 139.201710][ T5353] vfs_write+0x612/0xba0 [ 139.203706][ T5353] ? __pfx_vfs_write+0x10/0x10 [ 139.206004][ T5353] ? __fget_files+0x3a2/0x420 [ 139.208182][ T5353] ? __fget_files+0x2a/0x420 [ 139.210371][ T5353] ? fdget+0x1ac/0x250 [ 139.212335][ T5353] ksys_write+0x150/0x270 [ 139.214415][ T5353] ? __pfx_ksys_write+0x10/0x10 [ 139.216693][ T5353] do_syscall_64+0x171/0x540 [ 139.218991][ T5353] ? trace_irq_disable+0x3b/0x140 [ 139.221436][ T5353] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 139.224342][ T5353] ? clear_bhb_loop+0x70/0xc0 [ 139.226434][ T5353] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 139.228885][ T5353] RIP: 0033:0x7fa400ba9559 [ 139.230809][ T5353] 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 [ 139.239573][ T5353] RSP: 002b:00007fa401999fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 139.243592][ T5353] RAX: ffffffffffffffda RBX: 00007fa400e25fa0 RCX: 00007fa400ba9559 [ 139.247381][ T5353] RDX: 0000000000010448 RSI: 0000200000000e00 RDI: 0000000000000005 [ 139.250979][ T5353] RBP: 00007fa400c38136 R08: 0000000000000000 R09: 0000000000000000 [ 139.254788][ T5353] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 139.258789][ T5353] R13: 00007fa400e26038 R14: 00007fa400e25fa0 R15: 00007fff26e2c0d8 [ 139.262767][ T5353] [ 139.940517][ T5311] Bluetooth: hci0: command tx timeout [ 139.956066][ T1031] ata1.00: Read log 0x10 page 0x00 failed, Emask 0x1 [ 139.956084][ T1031] ata1: failed to read log page 10h (errno=-5) [ 139.956095][ T1031] ata1.00: NCQ disabled due to excessive errors [ 139.956102][ T1031] ata1.00: exception Emask 0x1 SAct 0x800 SErr 0x0 action 0x0 [ 139.956113][ T1031] ata1.00: irq_stat 0x41000008 [ 139.956124][ T1031] ata1.00: failed command: WRITE FPDMA QUEUED [ 139.956131][ T1031] ata1.00: cmd 61/98:58:ce:1a:08/0a:00:00:00:00/40 tag 11 ncq dma 1388544 ou [ 139.956131][ T1031] res 50/04:00:00:00:00/00:00:00:00:00/00 Emask 0x1 (device error) [ 139.956162][ T1031] ata1.00: status: { DRDY } [ 139.956169][ T1031] ata1.00: error: { ABRT } [ 139.958237][ T1031] ata1.00: configured for UDMA/100 [ 139.961115][ T1031] ata1: EH complete [ 141.995422][ T5311] Bluetooth: hci0: command tx timeout