program: syz_mount_image$hfsplus(&(0x7f0000000040), &(0x7f0000000080)='./file1\x00', 0x400, &(0x7f0000000140)=ANY=[], 0x1, 0x694, &(0x7f0000001100)="$eJzs3U1sHGf9B/DvbnbX3vz/Sp02SQOqRNRIBRGROLGSYi4NCKFIVKgqB8TRSpzGyiatHBc5EYLwfuDCoXeKRG5cQOIeVM7AqVcfKyFx6SmAxKKZnbXXr9l1Yq8tPp9odp5nnpd5nt/M7OzOKnKA/1nXzqXxOLVcO/fmcpFfeTTTWXk0c6efTjKRpJ40eqvU7ia1j5Kr6S35TLGx6q623X4+WJh9++NPVz7p5RrVUtav79Rukyv1LTY+rJacSXKkWj+Ddf1d39Bfa+TuaqszLAJ2th84GLdmku463z21VvJUw1+3wIFVK++bm6/5qeRoksnqc0Dvrti7Zx9qD8c9AAAAANgHL/yy/Ap/bNzjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgMOk9/f/i1W51PvpM6n1//5/q9qWKn2oPR73AAAAAAAAAABgdN/8/w0bPvckT7KcY/18t1b+5v9qmTlRvv5f3s+9zGcx57OcuSxlKYu5mGSqLG+Wr63luaWlxYtDtLy02jIDLS8NOYP27icPAAAAAAAAAIdFY/QmP861td//AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgIKglR3qrcjnRT0+l3kgymaRV1HuY/LWfPpB+/afBXPff3dKmao/3c0wAAAAwJi88yZMs51g/362V3/lPld/7J/N+7mYpC1lKJ/O5UT4L6H3rr688mumsPJq5Uyyb+/3qP0YaRtljes8ett7z6bJGOzezUG45n+t5N53cSL1sWTjdH8/W4/pRMabaG5UhR3ajWhcz/1WaI81qN2pD15wqI1KMqBeR6aptEY3jO0dixKPT31M/9hdTX33yc+J5xny5t3r9t711MZ+fjxSTvbYxEpcGzr5TK6ntEInk83/83Xdude7enrh579zBmdIIJgaeoG2MxMxAJF7e+ZxIM1Ukbh3WSAyaLiNxcjV/Ld/It3MuZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEhdOzdRpc5PF68rj2Y6xdJPr1Ysq9WT1L6f1D5Krqa3ZGqgu9p2+/lgYfbtjz9d+aSXa1RLWb++rl1zN7N4WC05k+RItR40+Qz9Xa/WuxpZqbY6wyJgZ/uBg3H7bwAAAP//2wMQAg==") r0 = creat(&(0x7f0000000100)='./bus\x00', 0x40) io_setup(0x202, &(0x7f0000000200)=0x0) io_submit(r1, 0x3b, &(0x7f0000000540)=[&(0x7f00000000c0)={0x25, 0xe7030000, 0x0, 0x1, 0x0, r0, &(0x7f0000000000), 0x70000}]) open(&(0x7f0000000000)='./file1\x00', 0x109042, 0x8) [ 75.446050][ T5337] Bluetooth: hci0: command tx timeout [ 75.540651][ T5357] loop0: detected capacity change from 0 to 1024 [ 75.672801][ T5357] [ 75.674124][ T5357] ====================================================== [ 75.677326][ T5357] WARNING: possible circular locking dependency detected [ 75.680450][ T5357] syzkaller #0 Not tainted [ 75.682558][ T5357] ------------------------------------------------------ [ 75.685842][ T5357] syz.0.0/5357 is trying to acquire lock: [ 75.688427][ T5357] ffff88803adcc0b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 [ 75.692800][ T5357] [ 75.692800][ T5357] but task is already holding lock: [ 75.696157][ T5357] ffff8880119e7048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x39e/0x1530 [ 75.701678][ T5357] [ 75.701678][ T5357] which lock already depends on the new lock. [ 75.701678][ T5357] [ 75.707757][ T5357] [ 75.707757][ T5357] the existing dependency chain (in reverse order) is: [ 75.712083][ T5357] [ 75.712083][ T5357] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}: [ 75.715968][ T5357] lock_acquire+0x120/0x360 [ 75.718244][ T5357] __mutex_lock+0x187/0x1350 [ 75.720979][ T5357] hfsplus_file_extend+0x1fc/0x1990 [ 75.723754][ T5357] hfsplus_bmap_reserve+0x122/0x500 [ 75.726716][ T5357] __hfsplus_ext_write_extent+0x28d/0x5b0 [ 75.729556][ T5357] __hfsplus_ext_cache_extent+0x89/0xe30 [ 75.732337][ T5357] hfsplus_file_extend+0x444/0x1990 [ 75.734864][ T5357] hfsplus_get_block+0x411/0x1530 [ 75.737528][ T5357] __block_write_begin_int+0x6b5/0x1900 [ 75.740423][ T5357] cont_write_begin+0x789/0xb50 [ 75.742856][ T5357] hfsplus_write_begin+0x66/0xb0 [ 75.745089][ T5357] generic_perform_write+0x2c5/0x900 [ 75.747506][ T5357] generic_file_write_iter+0x117/0x550 [ 75.750071][ T5357] aio_write+0x535/0x7a0 [ 75.752331][ T5357] io_submit_one+0x78b/0x1310 [ 75.754793][ T5357] __se_sys_io_submit+0x185/0x2f0 [ 75.757532][ T5357] do_syscall_64+0xfa/0x3b0 [ 75.759979][ T5357] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.762849][ T5357] [ 75.762849][ T5357] -> #0 (&tree->tree_lock/1){+.+.}-{4:4}: [ 75.766358][ T5357] validate_chain+0xb9b/0x2140 [ 75.768785][ T5357] __lock_acquire+0xab9/0xd20 [ 75.771155][ T5357] lock_acquire+0x120/0x360 [ 75.773417][ T5357] __mutex_lock+0x187/0x1350 [ 75.775782][ T5357] hfsplus_find_init+0x15a/0x1d0 [ 75.778159][ T5357] hfsplus_get_block+0x8dd/0x1530 [ 75.780619][ T5357] block_read_full_folio+0x29f/0x830 [ 75.783260][ T5357] read_pages+0x35a/0x580 [ 75.785346][ T5357] page_cache_ra_unbounded+0x6b0/0x7b0 [ 75.788220][ T5357] filemap_get_pages+0x43c/0x1ea0 [ 75.790787][ T5357] filemap_read+0x3f6/0x11a0 [ 75.793017][ T5357] __kernel_read+0x4cf/0x960 [ 75.795927][ T5357] integrity_kernel_read+0x89/0xd0 [ 75.798615][ T5357] ima_calc_file_hash+0x85e/0x16f0 [ 75.801549][ T5357] ima_collect_measurement+0x428/0x8e0 [ 75.804636][ T5357] process_measurement+0x1121/0x1a40 [ 75.807184][ T5357] ima_file_check+0xd7/0x120 [ 75.810002][ T5357] security_file_post_open+0xbb/0x290 [ 75.813088][ T5357] path_openat+0x2f26/0x3830 [ 75.815738][ T5357] do_filp_open+0x1fa/0x410 [ 75.818323][ T5357] do_sys_openat2+0x121/0x1c0 [ 75.820688][ T5357] __x64_sys_open+0x11e/0x150 [ 75.823119][ T5357] do_syscall_64+0xfa/0x3b0 [ 75.825374][ T5357] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.829578][ T5357] [ 75.829578][ T5357] other info that might help us debug this: [ 75.829578][ T5357] [ 75.834095][ T5357] Possible unsafe locking scenario: [ 75.834095][ T5357] [ 75.837473][ T5357] CPU0 CPU1 [ 75.839951][ T5357] ---- ---- [ 75.842339][ T5357] lock(&HFSPLUS_I(inode)->extents_lock); [ 75.845018][ T5357] lock(&tree->tree_lock/1); [ 75.848314][ T5357] lock(&HFSPLUS_I(inode)->extents_lock); [ 75.852042][ T5357] lock(&tree->tree_lock/1); [ 75.854214][ T5357] [ 75.854214][ T5357] *** DEADLOCK *** [ 75.854214][ T5357] [ 75.857861][ T5357] 3 locks held by syz.0.0/5357: [ 75.860060][ T5357] #0: ffff8880440e45b8 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: process_measurement+0x74b/0x1a40 [ 75.864575][ T5357] #1: ffff8880119e73d8 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x129/0x7b0 [ 75.869821][ T5357] #2: ffff8880119e7048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x39e/0x1530 [ 75.875980][ T5357] [ 75.875980][ T5357] stack backtrace: [ 75.879436][ T5357] CPU: 0 UID: 0 PID: 5357 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 75.879457][ T5357] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 75.879467][ T5357] Call Trace: [ 75.879475][ T5357] [ 75.879484][ T5357] dump_stack_lvl+0x189/0x250 [ 75.879507][ T5357] ? __pfx_dump_stack_lvl+0x10/0x10 [ 75.879521][ T5357] ? __pfx__printk+0x10/0x10 [ 75.879538][ T5357] ? print_lock_name+0xde/0x100 [ 75.879552][ T5357] print_circular_bug+0x2ee/0x310 [ 75.879564][ T5357] check_noncircular+0x134/0x160 [ 75.879576][ T5357] validate_chain+0xb9b/0x2140 [ 75.879587][ T5357] ? _raw_spin_unlock_irqrestore+0xad/0x110 [ 75.879600][ T5357] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 75.879618][ T5357] __lock_acquire+0xab9/0xd20 [ 75.879636][ T5357] ? hfsplus_find_init+0x15a/0x1d0 [ 75.879651][ T5357] lock_acquire+0x120/0x360 [ 75.879667][ T5357] ? hfsplus_find_init+0x15a/0x1d0 [ 75.879683][ T5357] ? ima_collect_measurement+0x428/0x8e0 [ 75.879697][ T5357] ? ima_file_check+0xd7/0x120 [ 75.879708][ T5357] ? path_openat+0x2f26/0x3830 [ 75.879734][ T5357] __mutex_lock+0x187/0x1350 [ 75.879754][ T5357] ? hfsplus_find_init+0x15a/0x1d0 [ 75.879773][ T5357] ? hfsplus_find_init+0x15a/0x1d0 [ 75.879791][ T5357] ? __pfx___mutex_lock+0x10/0x10 [ 75.879810][ T5357] ? rcu_is_watching+0x15/0xb0 [ 75.879821][ T5357] ? __kmalloc_noprof+0x29b/0x4f0 [ 75.879834][ T5357] ? hfsplus_find_init+0x8c/0x1d0 [ 75.879851][ T5357] hfsplus_find_init+0x15a/0x1d0 [ 75.879867][ T5357] hfsplus_get_block+0x8dd/0x1530 [ 75.879883][ T5357] ? __pfx_hfsplus_get_block+0x10/0x10 [ 75.879895][ T5357] ? _raw_spin_unlock+0x28/0x50 [ 75.879910][ T5357] block_read_full_folio+0x29f/0x830 [ 75.879923][ T5357] ? __pfx_hfsplus_get_block+0x10/0x10 [ 75.879935][ T5357] ? __pfx_hfsplus_read_folio+0x10/0x10 [ 75.879945][ T5357] read_pages+0x35a/0x580 [ 75.879961][ T5357] ? __pfx_read_pages+0x10/0x10 [ 75.879976][ T5357] ? filemap_add_folio+0x1af/0x270 [ 75.879992][ T5357] page_cache_ra_unbounded+0x6b0/0x7b0 [ 75.880011][ T5357] filemap_get_pages+0x43c/0x1ea0 [ 75.880034][ T5357] ? __pfx_filemap_get_pages+0x10/0x10 [ 75.880050][ T5357] ? __lock_acquire+0xab9/0xd20 [ 75.880066][ T5357] ? __pfx___might_resched+0x10/0x10 [ 75.880080][ T5357] filemap_read+0x3f6/0x11a0 [ 75.880099][ T5357] ? __pfx_filemap_read+0x10/0x10 [ 75.880122][ T5357] ? generic_file_read_iter+0x8f/0x510 [ 75.880138][ T5357] ? __asan_memset+0x22/0x50 [ 75.880148][ T5357] ? iov_iter_kvec+0xb8/0x180 [ 75.880165][ T5357] __kernel_read+0x4cf/0x960 [ 75.880180][ T5357] ? __pfx___kernel_read+0x10/0x10 [ 75.880195][ T5357] integrity_kernel_read+0x89/0xd0 [ 75.880209][ T5357] ? __pfx_integrity_kernel_read+0x10/0x10 [ 75.880222][ T5357] ? __kasan_kmalloc+0x93/0xb0 [ 75.880234][ T5357] ? ima_calc_file_hash+0x820/0x16f0 [ 75.880245][ T5357] ima_calc_file_hash+0x85e/0x16f0 [ 75.880260][ T5357] ? __pfx_ima_calc_file_hash+0x10/0x10 [ 75.880278][ T5357] ? stack_depot_save_flags+0x41b/0x860 [ 75.880291][ T5357] ? make_vfsgid+0x49/0xa0 [ 75.880302][ T5357] ? generic_fillattr+0x63d/0x9a0 [ 75.880318][ T5357] ? hfsplus_getattr+0x235/0x2f0 [ 75.880329][ T5357] ima_collect_measurement+0x428/0x8e0 [ 75.880342][ T5357] ? __pfx_ima_collect_measurement+0x10/0x10 [ 75.880356][ T5357] ? kasan_quarantine_put+0xdd/0x220 [ 75.880370][ T5357] ? hfsplus_getxattr+0x118/0x180 [ 75.880383][ T5357] ? __pfx_ima_get_hash_algo+0x10/0x10 [ 75.880400][ T5357] process_measurement+0x1121/0x1a40 [ 75.880414][ T5357] ? __pfx_process_measurement+0x10/0x10 [ 75.880424][ T5357] ? tomoyo_check_open_permission+0x16a/0x3b0 [ 75.880439][ T5357] ? __pfx_tomoyo_check_open_permission+0x10/0x10 [ 75.880460][ T5357] ? __pfx_apparmor_file_open+0x10/0x10 [ 75.880472][ T5357] ? tomoyo_file_open+0x165/0x220 [ 75.880488][ T5357] ima_file_check+0xd7/0x120 [ 75.880498][ T5357] ? __pfx_ima_file_check+0x10/0x10 [ 75.880510][ T5357] security_file_post_open+0xbb/0x290 [ 75.880524][ T5357] path_openat+0x2f26/0x3830 [ 75.880543][ T5357] ? __pfx_path_openat+0x10/0x10 [ 75.880554][ T5357] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.880571][ T5357] do_filp_open+0x1fa/0x410 [ 75.880583][ T5357] ? __lock_acquire+0xab9/0xd20 [ 75.880600][ T5357] ? __pfx_do_filp_open+0x10/0x10 [ 75.880615][ T5357] ? _raw_spin_unlock+0x28/0x50 [ 75.880631][ T5357] ? alloc_fd+0x64c/0x6c0 [ 75.880649][ T5357] do_sys_openat2+0x121/0x1c0 [ 75.880670][ T5357] ? __pfx_do_sys_openat2+0x10/0x10 [ 75.880688][ T5357] ? rcu_is_watching+0x15/0xb0 [ 75.880700][ T5357] __x64_sys_open+0x11e/0x150 [ 75.880728][ T5357] do_syscall_64+0xfa/0x3b0 [ 75.880746][ T5357] ? lockdep_hardirqs_on+0x9c/0x150 [ 75.880764][ T5357] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.880775][ T5357] ? clear_bhb_loop+0x60/0xb0 [ 75.880787][ T5357] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.880799][ T5357] RIP: 0033:0x7f99e098ebe9 [ 75.880813][ T5357] 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 [ 75.880823][ T5357] RSP: 002b:00007f99e1857038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 75.880837][ T5357] RAX: ffffffffffffffda RBX: 00007f99e0bb5fa0 RCX: 00007f99e098ebe9 [ 75.880845][ T5357] RDX: 0000000000000008 RSI: 0000000000109042 RDI: 0000200000000000 [ 75.880854][ T5357] RBP: 00007f99e0a11e19 R08: 0000000000000000 R09: 0000000000000000 [ 75.880862][ T5357] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 75.880871][ T5357] R13: 00007f99e0bb6038 R14: 00007f99e0bb5fa0 R15: 00007ffeb8347308 [ 75.880882][ T5357] [ 76.198113][ T25] audit: type=1800 audit(1756215193.036:2): pid=5357 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed comm="syz.0.0" name="file1" dev="loop0" ino=20 res=0 errno=0 [ 76.277450][ T1315] ieee802154 phy0 wpan0: encryption failed: -22 [ 76.280903][ T1315] ieee802154 phy1 wpan1: encryption failed: -22