================================================================== BUG: KASAN: slab-use-after-free in rose_get_neigh+0x1b6/0x6f0 net/rose/rose_route.c:692 Read of size 1 at addr ffff8880246dc030 by task syz-executor.0/21498 CPU: 1 PID: 21498 Comm: syz-executor.0 Not tainted 6.9.0-rc6-syzkaller-01468-g173e7622ccb3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 rose_get_neigh+0x1b6/0x6f0 net/rose/rose_route.c:692 rose_connect+0x45a/0x1170 net/rose/af_rose.c:808 __sys_connect_file net/socket.c:2048 [inline] __sys_connect+0x2df/0x310 net/socket.c:2065 __do_sys_connect net/socket.c:2075 [inline] __se_sys_connect net/socket.c:2072 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2072 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8047a7dca9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f80487390c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f8047babf80 RCX: 00007f8047a7dca9 RDX: 0000000000000040 RSI: 0000000020000080 RDI: 0000000000000008 RBP: 00007f8047ac947e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000004d R14: 00007f8047babf80 R15: 00007ffc489c3138 Allocated by task 20867: 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:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x1db/0x360 mm/slub.c:3997 kmalloc include/linux/slab.h:628 [inline] rose_add_node+0x209/0xda0 net/rose/rose_route.c:85 rose_rt_ioctl+0xa6f/0xed0 net/rose/rose_route.c:747 rose_ioctl+0x3cb/0x9d0 net/rose/af_rose.c:1372 sock_do_ioctl+0x158/0x460 net/socket.c:1222 sock_ioctl+0x629/0x8e0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 20975: 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:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 rose_rt_device_down+0x6e5/0x740 net/rose/rose_route.c:522 rose_device_event+0x601/0x6a0 net/rose/af_rose.c:248 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2031 [inline] call_netdevice_notifiers net/core/dev.c:2045 [inline] dev_close_many+0x33c/0x4c0 net/core/dev.c:1586 dev_close+0x1c0/0x2c0 net/core/dev.c:1608 bpq_device_event+0x372/0x8b0 drivers/net/hamradio/bpqether.c:547 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8854 dev_ifsioc+0x7c8/0xe70 net/core/dev_ioctl.c:530 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:787 sock_do_ioctl+0x240/0x460 net/socket.c:1236 sock_ioctl+0x629/0x8e0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880246dc000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of freed 512-byte region [ffff8880246dc000, ffff8880246dc200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880246dc000 pfn:0x246dc head: order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000a40(workingset|slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000a40 ffff888015041c80 ffffea0000bd1010 ffffea0001fda910 raw: ffff8880246dc000 000000000010000f 00000001ffffffff 0000000000000000 head: 00fff00000000a40 ffff888015041c80 ffffea0000bd1010 ffffea0001fda910 head: ffff8880246dc000 000000000010000f 00000001ffffffff 0000000000000000 head: 00fff00000000002 ffffea000091b701 ffffea000091b748 00000000ffffffff head: 0000000400000000 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 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1565748354 (swapper/0), ts 1, free_ts 14421525373 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] kmalloc_trace+0x269/0x360 mm/slub.c:3992 kmalloc include/linux/slab.h:628 [inline] usb_cache_string+0x63/0x100 drivers/usb/core/message.c:1028 usb_enumerate_device drivers/usb/core/hub.c:2497 [inline] usb_new_device+0x384/0x19a0 drivers/usb/core/hub.c:2622 register_root_hub+0x25c/0x550 drivers/usb/core/hcd.c:994 usb_add_hcd+0xae3/0x1080 drivers/usb/core/hcd.c:2968 vhci_hcd_probe+0x1f4/0x3c0 drivers/usb/usbip/vhci_hcd.c:1377 platform_probe+0x13a/0x1c0 drivers/base/platform.c:1404 really_probe+0x2b8/0xad0 drivers/base/dd.c:656 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798 driver_probe_device+0x50/0x430 drivers/base/dd.c:828 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:1141 [inline] free_unref_page_prepare+0x986/0xab0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 stack_depot_save_flags+0x6f6/0x830 lib/stackdepot.c:673 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x51/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmem_cache_alloc+0x174/0x340 mm/slub.c:3852 kmem_cache_zalloc include/linux/slab.h:739 [inline] fill_pool lib/debugobjects.c:168 [inline] debug_objects_fill_pool+0x79e/0x9b0 lib/debugobjects.c:615 __debug_object_init+0xa4/0x400 lib/debugobjects.c:627 debug_hrtimer_init kernel/time/hrtimer.c:417 [inline] debug_init+0x24/0x230 kernel/time/hrtimer.c:471 hrtimer_init+0x22/0x40 kernel/time/hrtimer.c:1599 pm_runtime_init+0x26e/0x3a0 drivers/base/power/runtime.c:1767 device_pm_init drivers/base/power/power.h:169 [inline] device_initialize+0x266/0x460 drivers/base/core.c:3196 device_register+0x15/0x20 drivers/base/core.c:3801 usb_create_ep_devs+0x130/0x230 drivers/usb/core/endpoint.c:169 usb_new_device+0x1168/0x19a0 drivers/usb/core/hub.c:2682 register_root_hub+0x25c/0x550 drivers/usb/core/hcd.c:994 Memory state around the buggy address: ffff8880246dbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880246dbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880246dc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880246dc080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880246dc100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================