RBP: 00007fa0e76221d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fff1193c8df R14: 00007fa0e7622300 R15: 0000000000022000 ------------[ cut here ]------------ kernel BUG at fs/ext4/extents.c:5683! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 7065 Comm: syz-executor.3 Not tainted 6.18.0-rc7-next-20251128 #1 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:ext4_swap_extents+0x9ce/0x1550 Code: 00 00 00 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 15 0a 00 00 48 8b 84 24 c8 00 00 00 89 18 e9 ff fc ff ff e8 93 71 8c ff 90 <0f> 0b e8 8b 71 8c ff 90 0f 0b e8 83 71 8c ff 48 8b 44 24 58 48 c1 RSP: 0018:ffff88804a40f8f8 EFLAGS: 00010212 RAX: 00000000000275ba RBX: 0000000000000000 RCX: ffffc900007f9000 RDX: 0000000000040000 RSI: ffffffff81e900bd RDI: 0000000000000007 RBP: ffff88802023ce40 R08: 0000000000000000 R09: ffffed10040479c8 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 00000000fffffff4 R14: ffffea000134e240 R15: 000000000000000a FS: 00007fa0e7622700(0000) GS:ffff8880e5468000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa0e7621f78 CR3: 000000001e5d2000 CR4: 0000000000350ef0 Call Trace: ext4_move_extents+0x3197/0x3790 __ext4_ioctl+0x118f/0x38e0 __x64_sys_ioctl+0x18f/0x210 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa0ea0acb19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa0e7622188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fa0ea1bff60 RCX: 00007fa0ea0acb19 RDX: 00000000200000c0 RSI: 00000000c028660f RDI: 0000000000000003 RBP: 00007fa0e76221d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fff1193c8df R14: 00007fa0e7622300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:ext4_swap_extents+0x9ce/0x1550 Code: 00 00 00 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 15 0a 00 00 48 8b 84 24 c8 00 00 00 89 18 e9 ff fc ff ff e8 93 71 8c ff 90 <0f> 0b e8 8b 71 8c ff 90 0f 0b e8 83 71 8c ff 48 8b 44 24 58 48 c1 RSP: 0018:ffff88804a40f8f8 EFLAGS: 00010212 RAX: 00000000000275ba RBX: 0000000000000000 RCX: ffffc900007f9000 RDX: 0000000000040000 RSI: ffffffff81e900bd RDI: 0000000000000007 RBP: ffff88802023ce40 R08: 0000000000000000 R09: ffffed10040479c8 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 00000000fffffff4 R14: ffffea000134e240 R15: 000000000000000a FS: 00007fa0e7622700(0000) GS:ffff8880e5468000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa0e7621f78 CR3: 000000001e5d2000 CR4: 0000000000350ef0 ================================================================== BUG: KASAN: slab-use-after-free in rwsem_down_write_slowpath+0x1522/0x1670 Read of size 4 at addr ffff888015c7b7b4 by task syz-executor.3/286 CPU: 1 UID: 0 PID: 286 Comm: syz-executor.3 Tainted: G D 6.18.0-rc7-next-20251128 #1 PREEMPT(voluntary) Tainted: [D]=DIE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xca/0x120 print_report+0xcb/0x610 kasan_report+0xca/0x100 rwsem_down_write_slowpath+0x1522/0x1670 down_write+0x1c2/0x1f0 vfs_unlink+0xd9/0xb50 do_unlinkat+0x361/0x620 __x64_sys_unlink+0xc7/0x110 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa0ea0ac457 Code: 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff1193ba28 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa0ea0ac457 RDX: 00007fff1193ba60 RSI: 00007fff1193ba60 RDI: 00007fff1193baf0 RBP: 00007fff1193baf0 R08: 0000000000000001 R09: 00007fff1193b8c0 R10: 000055557b1cec7b R11: 0000000000000206 R12: 00007fa0ea106105 R13: 00007fff1193cbb0 R14: 000055557b1cec20 R15: 00007fff1193cbf0 Allocated by task 7058: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_node_noprof+0x228/0x730 copy_process+0x460/0x7230 kernel_clone+0xea/0x7c0 __do_sys_clone+0xce/0x120 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 14: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x43/0x70 kmem_cache_free+0x2cd/0x660 rcu_core+0x73c/0x1ed0 handle_softirqs+0x1b1/0x740 run_ksoftirqd+0x2e/0x60 smpboot_thread_fn+0x41d/0x9d0 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x24/0x50 kasan_record_aux_stack+0x89/0xa0 __call_rcu_common.constprop.0+0x70/0xad0 delayed_put_task_struct+0xde/0x230 rcu_core+0x73c/0x1ed0 handle_softirqs+0x1b1/0x740 __irq_exit_rcu+0xc4/0x100 irq_exit_rcu+0x9/0x20 sysvec_apic_timer_interrupt+0x39/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 Second to last potentially related work creation: kasan_save_stack+0x24/0x50 kasan_record_aux_stack+0x89/0xa0 __call_rcu_common.constprop.0+0x70/0xad0 put_task_struct_rcu_user+0x75/0xc0 __schedule+0x1003/0x46a0 schedule+0xdb/0x390 do_nanosleep+0x15e/0x570 hrtimer_nanosleep+0x1a9/0x500 common_nsleep+0xaa/0xd0 __x64_sys_clock_nanosleep+0x331/0x470 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888015c7b780 which belongs to the cache task_struct of size 6848 The buggy address is located 52 bytes inside of freed 6848-byte region [ffff888015c7b780, ffff888015c7d240) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15c78 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800dcf9441 flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff88800944c640 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000000f5000000 ffff88800dcf9441 head: 0100000000000040 ffff88800944c640 dead000000000122 0000000000000000 head: 0000000000000000 0000000000040004 00000000f5000000 ffff88800dcf9441 head: 0100000000000003 ffffea0000571e01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888015c7b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015c7b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888015c7b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888015c7b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888015c7b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== kmemleak: 7 new suspected memory leaks (see /sys/kernel/debug/kmemleak)