================================================================== BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:690 Read of size 1 at addr ffff888020285c30 by task syz.5.1490/9992 CPU: 0 PID: 9992 Comm: syz.5.1490 Not tainted 5.15.182-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:690 rose_connect+0x412/0x1370 net/rose/af_rose.c:814 __sys_connect_file net/socket.c:1923 [inline] __sys_connect+0x389/0x410 net/socket.c:1940 __do_sys_connect net/socket.c:1950 [inline] __se_sys_connect net/socket.c:1947 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:1947 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fbccee64969 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:00007fbcccccc038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007fbccf08bfa0 RCX: 00007fbccee64969 RDX: 000000000000001c RSI: 0000200000000040 RDI: 0000000000000004 RBP: 00007fbcceee6ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbccf08bfa0 R15: 00007ffe23696768 Allocated by task 4252: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 __netdev_alloc_skb+0x103/0x4a0 net/core/skbuff.c:494 netdev_alloc_skb include/linux/skbuff.h:3001 [inline] dev_alloc_skb include/linux/skbuff.h:3014 [inline] __ieee80211_beacon_get+0xa73/0x1f80 net/mac80211/tx.c:5080 ieee80211_beacon_get_tim+0x48/0x840 net/mac80211/tx.c:5194 ieee80211_beacon_get include/net/mac80211.h:4981 [inline] mac80211_hwsim_beacon_tx+0xf4/0x920 drivers/net/wireless/mac80211_hwsim.c:1812 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:793 ieee80211_iterate_active_interfaces_atomic+0xb3/0x140 net/mac80211/util.c:829 mac80211_hwsim_beacon+0x9b/0x180 drivers/net/wireless/mac80211_hwsim.c:1865 __run_hrtimer kernel/time/hrtimer.c:1690 [inline] __hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1754 hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1771 handle_softirqs+0x328/0x820 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 Freed by task 4252: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xef/0x2a0 mm/slub.c:4559 skb_free_head net/core/skbuff.c:655 [inline] skb_release_data+0x6fe/0x850 net/core/skbuff.c:677 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb+0xa2/0x100 net/core/skbuff.c:914 mac80211_hwsim_beacon_tx+0x4f3/0x920 drivers/net/wireless/mac80211_hwsim.c:1842 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:793 ieee80211_iterate_active_interfaces_atomic+0xb3/0x140 net/mac80211/util.c:829 mac80211_hwsim_beacon+0x9b/0x180 drivers/net/wireless/mac80211_hwsim.c:1865 __run_hrtimer kernel/time/hrtimer.c:1690 [inline] __hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1754 hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1771 handle_softirqs+0x328/0x820 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 The buggy address belongs to the object at ffff888020285c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of 512-byte region [ffff888020285c00, ffff888020285e00) The buggy address belongs to the page: page:ffffea000080a100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20284 head:ffffea000080a100 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016841c80 raw: 0000000000000000 0000000000100010 00000001ffffffff 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 1, ts 6609076575, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] kmem_cache_alloc_node_trace+0x1dd/0x300 mm/slub.c:3270 kmalloc_node include/linux/slab.h:622 [inline] kzalloc_node include/linux/slab.h:746 [inline] __alloc_disk_node+0x6b/0x4b0 block/genhd.c:1305 __blk_mq_alloc_disk+0xdf/0x150 block/blk-mq.c:3178 null_add_dev+0x110d/0x16a0 drivers/block/null_blk/main.c:1853 null_init+0x272/0x4f0 drivers/block/null_blk/main.c:2001 do_one_initcall+0x1ee/0x680 init/main.c:1302 do_initcall_level+0x137/0x1f0 init/main.c:1375 do_initcalls+0x4b/0x90 init/main.c:1391 kernel_init_freeable+0x3ce/0x560 init/main.c:1615 kernel_init+0x19/0x1b0 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page_owner free stack trace missing Memory state around the buggy address: ffff888020285b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888020285b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888020285c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888020285c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888020285d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================