================================================================== BUG: KASAN: slab-use-after-free in rose_link_device_down+0x7a/0xb0 net/rose/rose_route.c:-1 Read of size 8 at addr ffff88805cab3800 by task syz.4.2671/14280 CPU: 1 UID: 0 PID: 14280 Comm: syz.4.2671 Not tainted 6.15.0-rc3-syzkaller-00008-ga33b5a08cbbd #0 PREEMPT(full) 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+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 rose_link_device_down+0x7a/0xb0 net/rose/rose_route.c:-1 rose_device_event+0x5fe/0x6a0 net/rose/af_rose.c:247 notifier_call_chain+0x1a7/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] dev_close_many+0x33e/0x4c0 net/core/dev.c:1731 netif_close+0x1c2/0x2d0 net/core/dev.c:1744 dev_close+0x137/0x280 net/core/dev_api.c:219 bpq_device_event+0x36a/0x620 drivers/net/hamradio/bpqether.c:528 notifier_call_chain+0x1a7/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] dev_close_many+0x33e/0x4c0 net/core/dev.c:1731 netif_close+0x1c2/0x2d0 net/core/dev.c:1744 dev_close+0x137/0x280 net/core/dev_api.c:219 bond_setup_by_slave+0x64/0x420 drivers/net/bonding/bond_main.c:1627 bond_enslave+0x7fb/0x38d0 drivers/net/bonding/bond_main.c:2039 bond_do_ioctl+0x7c9/0xc00 drivers/net/bonding/bond_main.c:4684 dev_siocbond net/core/dev_ioctl.c:502 [inline] dev_ifsioc+0x97c/0x1010 net/core/dev_ioctl.c:650 dev_ioctl+0x80f/0x1260 net/core/dev_ioctl.c:821 sock_do_ioctl+0x22f/0x400 net/socket.c:1204 sock_ioctl+0x644/0x900 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf3/0x160 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fde0958e169 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:00007fde0a425038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fde097b5fa0 RCX: 00007fde0958e169 RDX: 0000200000000180 RSI: 0000000000008990 RDI: 0000000000000007 RBP: 00007fde09610a68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fde097b5fa0 R15: 00007ffe60f20de8 Allocated by task 14280: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x9d/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x236/0x370 mm/slub.c:4372 kmalloc_noprof include/linux/slab.h:905 [inline] rose_add_node+0x209/0xdb0 net/rose/rose_route.c:85 rose_rt_ioctl+0xac2/0xf80 net/rose/rose_route.c:747 rose_ioctl+0x3ca/0x9e0 net/rose/af_rose.c:1380 sock_do_ioctl+0x154/0x400 net/socket.c:1190 sock_ioctl+0x644/0x900 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf3/0x160 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 14285: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2398 [inline] slab_free mm/slub.c:4656 [inline] kfree+0x198/0x430 mm/slub.c:4855 rose_clear_routes net/rose/rose_route.c:578 [inline] rose_rt_ioctl+0x356/0xf80 net/rose/rose_route.c:759 rose_ioctl+0x3ca/0x9e0 net/rose/af_rose.c:1380 sock_do_ioctl+0x154/0x400 net/socket.c:1190 sock_ioctl+0x644/0x900 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf3/0x160 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805cab3800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff88805cab3800, ffff88805cab3a00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5cab0 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b041c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b041c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea000172ac01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5844, tgid 5844 (syz-executor), ts 91662223925, free_ts 29431073190 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x360a/0x37a0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4970 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2468 [inline] allocate_slab+0x8f/0x3b0 mm/slub.c:2632 new_slab mm/slub.c:2686 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3872 __slab_alloc+0x58/0xa0 mm/slub.c:3962 __slab_alloc_node mm/slub.c:4037 [inline] slab_alloc_node mm/slub.c:4198 [inline] __do_kmalloc_node mm/slub.c:4340 [inline] __kmalloc_noprof+0x2ea/0x4d0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:909 [inline] switchdev_deferred_enqueue+0x4d/0x2a0 net/switchdev/switchdev.c:117 br_set_state+0x2cd/0x7b0 net/bridge/br_stp.c:52 br_init_port+0xa0/0x210 net/bridge/br_stp_if.c:39 new_nbp+0x30c/0x440 net/bridge/br_if.c:442 br_add_if+0x28d/0xef0 net/bridge/br_if.c:599 do_set_master+0x57b/0x730 net/core/rtnetlink.c:2946 do_setlink+0xf76/0x4390 net/core/rtnetlink.c:3159 rtnl_changelink net/core/rtnetlink.c:3769 [inline] __rtnl_newlink net/core/rtnetlink.c:3928 [inline] rtnl_newlink+0x17e2/0x1fe0 net/core/rtnetlink.c:4065 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xde8/0x10a0 mm/page_alloc.c:2725 __free_pages mm/page_alloc.c:5080 [inline] free_contig_range+0x154/0x430 mm/page_alloc.c:6936 destroy_args+0x94/0x4b0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x555/0x590 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x24c/0x940 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x432/0x5d0 init/main.c:1567 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88805cab3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805cab3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805cab3800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805cab3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805cab3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================