VFS: Found a Xenix FS (block size = 1024) on device loop4 ================================================================== BUG: KASAN: slab-use-after-free in sysv_new_inode+0xec6/0x1180 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff8880323801ce by task syz.4.58/6194 CPU: 0 UID: 0 PID: 6194 Comm: syz.4.58 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xd9/0x110 mm/kasan/report.c:634 sysv_new_inode+0xec6/0x1180 fs/sysv/ialloc.c:153 sysv_mknod+0x71/0x150 fs/sysv/namei.c:53 vfs_mknod+0x5da/0x8e0 fs/namei.c:4191 do_mknodat+0x310/0x5d0 fs/namei.c:4251 __do_sys_mknodat fs/namei.c:4269 [inline] __se_sys_mknodat fs/namei.c:4266 [inline] __x64_sys_mknodat+0xaf/0xe0 fs/namei.c:4266 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f919a18d169 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 RSP: 002b:00007f9197ff6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000103 RAX: ffffffffffffffda RBX: 00007f919a3a5fa0 RCX: 00007f919a18d169 RDX: 00000000000061c0 RSI: 0000200000000180 RDI: ffffffffffffff9c RBP: 00007f919a20e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000700 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f919a3a5fa0 R15: 00007ffcd515dea8 Allocated by task 5830: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] kmem_cache_alloc_node_noprof+0x223/0x3c0 mm/slub.c:4216 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:515 __alloc_skb+0x164/0x380 net/core/skbuff.c:606 alloc_skb include/linux/skbuff.h:1331 [inline] __tcp_send_ack.part.0+0x64/0x6f0 net/ipv4/tcp_output.c:4249 __tcp_send_ack net/ipv4/tcp_output.c:4281 [inline] tcp_send_ack+0x82/0xa0 net/ipv4/tcp_output.c:4281 tcp_delack_timer_handler net/ipv4/tcp_timer.c:343 [inline] tcp_delack_timer_handler+0x33b/0x4e0 net/ipv4/tcp_timer.c:307 tcp_delack_timer+0x23a/0x3c0 net/ipv4/tcp_timer.c:374 call_timer_fn+0x1a3/0x610 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1840 [inline] __run_timers+0x6e8/0x930 kernel/time/timer.c:2414 __run_timer_base kernel/time/timer.c:2426 [inline] __run_timer_base kernel/time/timer.c:2418 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2435 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2445 handle_softirqs+0x216/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Freed by task 5830: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kmem_cache_free+0x2e2/0x4d0 mm/slub.c:4711 skb_kfree_head net/core/skbuff.c:994 [inline] skb_kfree_head net/core/skbuff.c:991 [inline] skb_free_head+0x18a/0x1d0 net/core/skbuff.c:1008 skb_release_data+0x560/0x730 net/core/skbuff.c:1035 skb_release_all net/core/skbuff.c:1100 [inline] napi_consume_skb+0x15a/0x220 net/core/skbuff.c:1428 __free_old_xmit+0x18b/0x640 drivers/net/virtio_net.c:599 virtnet_free_old_xmit drivers/net/virtio_net.c:632 [inline] free_old_xmit+0xbf/0x1b0 drivers/net/virtio_net.c:1067 virtnet_poll_tx+0xee2/0x14f0 drivers/net/virtio_net.c:3157 __napi_poll.constprop.0+0xba/0x550 net/core/dev.c:7191 napi_poll net/core/dev.c:7260 [inline] net_rx_action+0xa94/0x1010 net/core/dev.c:7382 handle_softirqs+0x216/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 common_interrupt+0xbf/0xe0 arch/x86/kernel/irq.c:280 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 The buggy address belongs to the object at ffff888032380000 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 462 bytes inside of freed 704-byte region [ffff888032380000, ffff8880323802c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32380 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801daf8b40 ffffea0000a3cd00 0000000000000005 raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801daf8b40 ffffea0000a3cd00 0000000000000005 head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000c8e001 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5203, tgid 5203 (udevd), ts 102587029103, free_ts 101318638249 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4740 alloc_pages_mpol+0x1fc/0x540 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2587 [inline] new_slab+0x23d/0x330 mm/slub.c:2640 ___slab_alloc+0xc5d/0x1720 mm/slub.c:3826 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] kmem_cache_alloc_node_noprof+0xfc/0x3c0 mm/slub.c:4216 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:515 __alloc_skb+0x164/0x380 net/core/skbuff.c:606 alloc_skb include/linux/skbuff.h:1331 [inline] netlink_alloc_large_skb+0x69/0x130 net/netlink/af_netlink.c:1186 netlink_sendmsg+0x689/0xd70 net/netlink/af_netlink.c:1857 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0xab2/0xc90 net/socket.c:2573 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2627 __sys_sendmsg+0x16e/0x220 net/socket.c:2659 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 page last free pid 26 tgid 26 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] __kmalloc_cache_noprof+0x243/0x410 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:889 [inline] nsim_fib_event_work+0x1384/0x26d0 drivers/net/netdevsim/fib.c:1493 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3400 kthread+0x3b2/0x750 kernel/kthread.c:464 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888032380080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888032380100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888032380180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888032380200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888032380280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== syz.4.58: attempt to access beyond end of device loop4: rw=2049, sector=6491536, nr_sectors = 2 limit=128