program: syz_mount_image$ext4(&(0x7f00000003c0)='ext4\x00', &(0x7f0000000480)='./file1\x00', 0x10, &(0x7f0000000140)={[{@norecovery}]}, 0xed, 0x474, &(0x7f0000000b80)="$eJzs3EtsG0UfAPD/rvNo+viSr5RHSwuBgqh4JE36oAcuIJA4gIQEhyJOIUmrUrdBTZBoVUHhUI6oEnfEEYk7Eie4IOCAkLjCHVWqql5aOBmtvZs6jp06tRu3+PeT1p7ZXWfm79mxxzN2Auhb49lNErE1Iv6IiNFaduUJ47W7G9fOz/597fxsEpXKm1eT6nnXr52fLU4tHrellqlUIoaz5HCTci++EzFTLs+fyfOTS6fen1w8e+65E6dmjs8fnz89feTIwQN7hg5PH+oovjS/z+K6vuujhd07X3370uuzRy+9+/M3WX235sfr47gtWbQNxmvPbqNHs5snOyrsrvJrdrOtbkcy0PrkiQ2oEO0rRUTWXIPV/j8apRhZPjYar3za08oBd1SlUqk0e3/OXagA/2FJ9LoGQG8Ub/TZ599i26Chx13hyou1D0BZ3DfyrXZkYHnuYLDh8203jUfE0Qv/fJlt0Y15CACAW/g+G/8822z8l8YDdef9L19DGYuI/0fE9oi4LyJ2RMT9EdVzH4yIh9ZZfuMKyerxT3r5tgJrUzb+eyFf21o5/itGfzFWynPbqvEPJsdOlOf358/JvhgczvJTa5Txw8u/f16kNzUcqx//ZVtWfjEWzOtxeaBhgm5uZmmm07gLVz6J2DXQLP4kimWcJCJ2RsSu2yzjxNNf72517Nbxr2GNdaZ2Vb6KeKrW/hdiRfw3myppuT459fzh6UOTm6I8v3+yuCpW++W3i2+0Kr+j+Lsga//NTa//5VXgsWRTxOLZcyer67WL6y/j4p+f1fXpFavLWfzptxHrvv6Hkreq6aF834czS0tnpiKGktdW75+++dgiX5yfxb9vb/P+v72uxg9HRHYR74mIR/JF3KztHouIxyNi7xrx//TSE++1Oraq/UeK+NeYle+iLP65W7V/1Lf/+hOlkz9+13b8Tdv/YDW1L9/TzutfuxXs5LkDAACAe0Va/Q58kk4sp9N0YqL2Hf4dsTktLywuPXNs4YPTc7Xvyo/FYFrMdI3WzYdO5XPDRX66IX8gnzf+ojRSzU/MLpTneh089LktLfp/5q9Sr2sH3HFdWEcD7lH6P/Qv/R/6l/4P/Uv/h/7VrP9/3IN6ABvP+z/0L/0f+pf+D/1L/4e+1PK38WlHP/nvcaL43wkd/J2rvY+i48TInSwi0t4H2BeJgU4u43YSw00P9fiFCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoEv+DQAA//9L2OJW") open(&(0x7f0000000180)='./bus\x00', 0x14927e, 0x0) mount(&(0x7f0000000280)=@loop={'/dev/loop', 0x0}, &(0x7f00000003c0)='./bus\x00', 0x0, 0x5000, 0x0) r0 = syz_open_dev$dri(&(0x7f0000000000), 0x1ff, 0x48100) r1 = syz_open_dev$dri(&(0x7f00000000c0), 0x1ff, 0x0) ioctl$DRM_IOCTL_MODE_GETRESOURCES(r1, 0xc04064a0, &(0x7f0000000040)={0x0, &(0x7f00000002c0)=[0x0], 0x0, 0x0, 0xfffffd9f, 0x1}) ioctl$DRM_IOCTL_MODE_CURSOR(r0, 0xc01c64a3, &(0x7f0000000280)={0x3, r2, 0x3, 0x10003, 0x20a, 0x1ff, 0x1}) r3 = open(&(0x7f0000000000)='./bus\x00', 0x8000, 0xa0) ioctl$LOOP_SET_STATUS64(r3, 0x4c04, &(0x7f0000000540)={0x0, 0x0, 0x0, 0x0, 0x8005, 0x0, 0x0, 0x14, 0xd, "ef359f413bb9386ff7d6a4ae6dddfbd1ce5d29c2ee5e5ca9000ff8ee09e7376b7a5ff537ed73ac58818d78c660e677df8dc905b90242b7c528a076d2f6a00400", "036c5bc6780820d1cbf7966d61fdcf335263bd9b0abdc2542ded71038259ca171ce1a311ef545032d71e14ef3dc177e9b48b001d00", "f28359738e229a4c66810000000000d300e6d602000000000000000000000001", [0x8]}) bpf$PROG_LOAD(0x5, &(0x7f00000004c0)={0x3, 0x10, &(0x7f0000000740)=@framed={{0x18, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xfffffffc}, [@snprintf={{0x7, 0x0, 0xb, 0x8, 0x0, 0x0, 0x2}, {0x3, 0x3, 0x3, 0xa, 0x8, 0xfe00}, {0x7, 0x0, 0x8, 0x8, 0x0, 0x0, 0x3}, {}, {0x5}, {0x7, 0x0, 0x0, 0x0}, {}, {}, {}, {}, {0x7, 0x0, 0xb, 0x4}, {0x85, 0x0, 0x0, 0x1a}}]}, &(0x7f0000000ac0)='syzkaller\x00', 0xf, 0x0, 0x0, 0x0, 0x4, '\x00', 0x0, @sched_cls, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x94) r4 = openat(0xffffffffffffff9c, &(0x7f0000000040)='./file1\x00', 0x143042, 0x0) pwritev2(r4, &(0x7f00000001c0)=[{&(0x7f0000000080)="ff", 0xfdef}], 0x1, 0xe7b, 0x0, 0x86) [ 94.097663][ T5314] loop0: detected capacity change from 0 to 512 [ 94.189247][ T5314] EXT4-fs (loop0): invalid journal inode [ 94.192170][ T5314] EXT4-fs (loop0): can't get journal size [ 94.200438][ T5278] Bluetooth: hci0: command tx timeout [ 94.455672][ T5314] EXT4-fs (loop0): 1 truncate cleaned up [ 94.463255][ T5314] EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. [ 94.500837][ T5314] loop0: detected capacity change from 512 to 64 [ 94.533585][ T136] kworker/u4:5: attempt to access beyond end of device [ 94.533585][ T136] loop0: rw=1, sector=386, nr_sectors = 2 limit=64 [ 94.550561][ T136] EXT4-fs warning (device loop0): ext4_end_bio:364: I/O error 10 writing to inode 15 starting block 193) [ 94.563106][ T136] Buffer I/O error on device loop0, logical block 193 [ 94.575314][ T136] kworker/u4:5: attempt to access beyond end of device [ 94.575314][ T136] loop0: rw=1, sector=392, nr_sectors = 2 limit=64 [ 94.597480][ T5314] syz.0.0: attempt to access beyond end of device [ 94.597480][ T5314] loop0: rw=2049, sector=394, nr_sectors = 16 limit=64 [ 94.605868][ T136] EXT4-fs warning (device loop0): ext4_end_bio:364: I/O error 10 writing to inode 15 starting block 196) [ 94.620648][ T136] Buffer I/O error on device loop0, logical block 196 [ 94.648755][ T136] EXT4-fs error (device loop0): ext4_do_update_inode:5801: inode #15: comm kworker/u4:5: corrupted inode contents [ 94.671238][ T5314] EXT4-fs warning (device loop0): ext4_end_bio:364: I/O error 10 writing to inode 15 starting block 197) [ 94.683105][ T136] EXT4-fs error (device loop0): ext4_dirty_inode:6731: inode #15: comm kworker/u4:5: mark_inode_dirty error [ 94.696447][ T136] EXT4-fs error (device loop0): ext4_do_update_inode:5801: inode #15: comm kworker/u4:5: corrupted inode contents [ 94.706119][ T5314] Buffer I/O error on device loop0, logical block 197 [ 94.709204][ T5314] Buffer I/O error on device loop0, logical block 198 [ 94.711923][ T5314] Buffer I/O error on device loop0, logical block 199 [ 94.714666][ T5314] Buffer I/O error on device loop0, logical block 200 [ 94.722034][ T136] EXT4-fs error (device loop0): ext4_dirty_inode:6731: inode #15: comm kworker/u4:5: mark_inode_dirty error [ 94.730728][ T5314] Buffer I/O error on device loop0, logical block 201 [ 94.733704][ T5314] Buffer I/O error on device loop0, logical block 202 [ 94.736610][ T5314] Buffer I/O error on device loop0, logical block 203 [ 94.739444][ T5314] Buffer I/O error on device loop0, logical block 204 [ 94.850836][ T5314] EXT4-fs error (device loop0): ext4_do_update_inode:5801: inode #15: comm syz.0.0: corrupted inode contents [ 94.858592][ T5314] EXT4-fs error (device loop0): ext4_dirty_inode:6731: inode #15: comm syz.0.0: mark_inode_dirty error [ 94.869598][ T5314] ------------[ cut here ]------------ [ 94.872492][ T5314] kernel BUG at fs/ext4/mballoc.c:4781! [ 94.874798][ T5314] Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI [ 94.877584][ T5314] CPU: 0 UID: 0 PID: 5314 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 94.881371][ T5314] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 94.885935][ T5314] RIP: 0010:ext4_mb_use_inode_pa+0x6bf/0x720 [ 94.888556][ T5314] Code: e8 e6 0f a2 ff 48 ba 00 00 00 00 00 fc ff df e9 d7 fa ff ff e8 a2 c7 30 ff 90 0f 0b e8 9a c7 30 ff 90 0f 0b e8 92 c7 30 ff 90 <0f> 0b e8 8a c7 30 ff 90 0f 0b 48 8b 0c 24 48 83 c1 54 80 e1 07 80 [ 94.896684][ T5314] RSP: 0018:ffffc9000dc7e920 EFLAGS: 00010283 [ 94.899305][ T5314] RAX: ffffffff82966d2e RBX: 00000000ffffffee RCX: 0000000000100000 [ 94.902402][ T5314] RDX: ffffc9000f231000 RSI: 0000000000009ca7 RDI: 0000000000009ca8 [ 94.905788][ T5314] RBP: 1ffff1100879d8b5 R08: ffff888043cf1163 R09: 1ffff1100879e22c [ 94.909504][ T5314] R10: dffffc0000000000 R11: ffffed100879e22d R12: 0000000000000000 [ 94.912937][ T5314] R13: 0000000000000014 R14: 1ffff1100879e22f R15: ffff888043cf1178 [ 94.915965][ T5314] FS: 00007f1c9c1166c0(0000) GS:ffff88808c30a000(0000) knlGS:0000000000000000 [ 94.919524][ T5314] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 94.922166][ T5314] CR2: 000020000000f000 CR3: 000000000be53000 CR4: 0000000000352ef0 [ 94.925451][ T5314] Call Trace: [ 94.926979][ T5314] [ 94.928269][ T5314] ext4_mb_use_preallocated+0x638/0x13e0 [ 94.930589][ T5314] ext4_mb_new_blocks+0x5a0/0x4530 [ 94.932742][ T5314] ? do_raw_spin_unlock+0x4d/0x200 [ 94.935009][ T5314] ? _raw_spin_unlock+0x28/0x50 [ 94.937118][ T5314] ? __pfx_ext4_new_meta_blocks+0x10/0x10 [ 94.939545][ T5314] ? __pfx_ext4_mb_new_blocks+0x10/0x10 [ 94.942009][ T5314] ? ext4_block_to_path+0x382/0x700 [ 94.944198][ T5314] ext4_ind_map_blocks+0xe96/0x22a0 [ 94.946479][ T5314] ? __pfx_ext4_ind_map_blocks+0x10/0x10 [ 94.948986][ T5314] ? kasan_save_track+0x4f/0x80 [ 94.951152][ T5314] ? ext4_map_blocks+0x77d/0x12c0 [ 94.953422][ T5314] ? down_write+0x16b/0x200 [ 94.955442][ T5314] ext4_map_create_blocks+0xbb/0x530 [ 94.957785][ T5314] ? ext4_fc_track_inode+0xf3/0x3f0 [ 94.959950][ T5314] ext4_map_blocks+0x791/0x12c0 [ 94.962142][ T5314] ? __pfx_ext4_map_blocks+0x10/0x10 [ 94.964376][ T5314] ext4_do_writepages+0x1901/0x4770 [ 94.966654][ T5314] ? __lock_acquire+0x683/0x2cf0 [ 94.968879][ T5314] ? __pfx_ext4_do_writepages+0x10/0x10 [ 94.971347][ T5314] ? __lock_acquire+0x683/0x2cf0 [ 94.973472][ T5314] ? __free_object+0x432/0x5d0 [ 94.975613][ T5314] ? lockdep_hardirqs_on+0x7b/0x110 [ 94.977978][ T5314] ? _raw_spin_unlock_irqrestore+0x30/0x80 [ 94.980478][ T5314] ? debug_object_free+0x29c/0x340 [ 94.982798][ T5314] ? ext4_writepages+0x205/0x3b0 [ 94.984977][ T5314] ? ext4_writepages+0x205/0x3b0 [ 94.987179][ T5314] ext4_writepages+0x241/0x3b0 [ 94.989305][ T5314] ? __pfx_ext4_writepages+0x10/0x10 [ 94.991584][ T5314] ? __pfx_ext4_writepages+0x10/0x10 [ 94.993948][ T5314] do_writepages+0x338/0x560 [ 94.995917][ T5314] ? do_raw_spin_unlock+0x4d/0x200 [ 94.998198][ T5314] file_write_and_wait_range+0x36e/0x440 [ 95.000635][ T5314] ? __pfx_file_write_and_wait_range+0x10/0x10 [ 95.003400][ T5314] ext4_sync_file+0x252/0xa40 [ 95.005472][ T5314] ext4_buffered_write_iter+0x2d0/0x380 [ 95.007845][ T5314] ext4_file_write_iter+0xae4/0x1cd0 [ 95.010162][ T5314] ? __lock_acquire+0x683/0x2cf0 [ 95.012284][ T5314] ? __pfx_aa_file_perm+0x10/0x10 [ 95.014306][ T5314] ? __pfx_ext4_file_write_iter+0x10/0x10 [ 95.016734][ T5314] ? preempt_schedule_thunk+0x16/0x40 [ 95.019152][ T5314] do_iter_readv_writev+0x612/0x8c0 [ 95.021396][ T5314] ? __pfx_do_iter_readv_writev+0x10/0x10 [ 95.023785][ T5314] vfs_writev+0x343/0x990 [ 95.025590][ T5314] ? __pfx_vfs_writev+0x10/0x10 [ 95.027662][ T5314] ? __fget_files+0x2a/0x420 [ 95.029669][ T5314] ? __fget_files+0x3a2/0x420 [ 95.031707][ T5314] ? __fget_files+0x2a/0x420 [ 95.033729][ T5314] __se_sys_pwritev2+0x177/0x2a0 [ 95.035943][ T5314] ? __pfx___se_sys_pwritev2+0x10/0x10 [ 95.038300][ T5314] ? __x64_sys_pwritev2+0x20/0xc0 [ 95.040543][ T5314] do_syscall_64+0x166/0x520 [ 95.042575][ T5314] ? trace_irq_disable+0x3b/0x140 [ 95.044734][ T5314] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.047254][ T5314] ? clear_bhb_loop+0x70/0xc0 [ 95.049356][ T5314] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.051867][ T5314] RIP: 0033:0x7f1c9b19e0d9 [ 95.053776][ T5314] 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 [ 95.061790][ T5314] RSP: 002b:00007f1c9c115fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 [ 95.065343][ T5314] RAX: ffffffffffffffda RBX: 00007f1c9b425fa0 RCX: 00007f1c9b19e0d9 [ 95.068753][ T5314] RDX: 0000000000000001 RSI: 00002000000001c0 RDI: 0000000000000008 [ 95.072089][ T5314] RBP: 00007f1c9b235024 R08: 0000000000000000 R09: 0000000000000086 [ 95.075423][ T5314] R10: 0000000000000e7b R11: 0000000000000246 R12: 0000000000000000 [ 95.078757][ T5314] R13: 00007f1c9b426038 R14: 00007f1c9b425fa0 R15: 00007fff671ace58 [ 95.082147][ T5314] [ 95.083465][ T5314] Modules linked in: [ 95.085904][ T5314] ---[ end trace 0000000000000000 ]--- [ 95.088254][ T5314] RIP: 0010:ext4_mb_use_inode_pa+0x6bf/0x720 [ 95.091024][ T5314] Code: e8 e6 0f a2 ff 48 ba 00 00 00 00 00 fc ff df e9 d7 fa ff ff e8 a2 c7 30 ff 90 0f 0b e8 9a c7 30 ff 90 0f 0b e8 92 c7 30 ff 90 <0f> 0b e8 8a c7 30 ff 90 0f 0b 48 8b 0c 24 48 83 c1 54 80 e1 07 80 [ 95.100074][ T5314] RSP: 0018:ffffc9000dc7e920 EFLAGS: 00010283 [ 95.102742][ T5314] RAX: ffffffff82966d2e RBX: 00000000ffffffee RCX: 0000000000100000 [ 95.106144][ T5314] RDX: ffffc9000f231000 RSI: 0000000000009ca7 RDI: 0000000000009ca8 [ 95.109794][ T5314] RBP: 1ffff1100879d8b5 R08: ffff888043cf1163 R09: 1ffff1100879e22c [ 95.113105][ T5314] R10: dffffc0000000000 R11: ffffed100879e22d R12: 0000000000000000 [ 95.116638][ T5314] R13: 0000000000000014 R14: 1ffff1100879e22f R15: ffff888043cf1178 [ 95.120655][ T5314] FS: 00007f1c9c1166c0(0000) GS:ffff88808c30a000(0000) knlGS:0000000000000000 [ 95.124360][ T5314] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 95.127186][ T5314] CR2: 000020000000f000 CR3: 000000000be53000 CR4: 0000000000352ef0 [ 95.130555][ T5314] Kernel panic - not syncing: Fatal exception [ 95.133477][ T5314] Kernel Offset: disabled [ 95.135261][ T5314] Rebooting in 86400 seconds..