================================================================== BUG: KASAN: slab-use-after-free in rose_get_neigh+0x549/0x640 net/rose/rose_route.c:692 Read of size 1 at addr ffff888032784030 by task syz.1.3398/16043 CPU: 2 UID: 0 PID: 16043 Comm: syz.1.3398 Not tainted 6.16.0-rc3-syzkaller-00190-g67a993863163 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 rose_get_neigh+0x549/0x640 net/rose/rose_route.c:692 rose_connect+0x2d4/0x1540 net/rose/af_rose.c:816 __sys_connect_file+0x141/0x1a0 net/socket.c:2038 __sys_connect+0x13b/0x160 net/socket.c:2057 __do_sys_connect net/socket.c:2063 [inline] __se_sys_connect net/socket.c:2060 [inline] __x64_sys_connect+0x72/0xb0 net/socket.c:2060 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8ddcb8e929 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:00007f8ddd9b1038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f8ddcdb5fa0 RCX: 00007f8ddcb8e929 RDX: 000000000000001c RSI: 0000200000000040 RDI: 000000000000000d RBP: 00007f8ddcc10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8ddcdb5fa0 R15: 00007fff82edeec8 Allocated by task 13: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_noprof+0x223/0x510 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3811 ip6_route_add.part.0+0x22/0x1d0 net/ipv6/route.c:3940 ip6_route_add+0x45/0x60 net/ipv6/route.c:3937 addrconf_add_mroute+0x1dd/0x350 net/ipv6/addrconf.c:2551 addrconf_add_dev+0x14e/0x1c0 net/ipv6/addrconf.c:2569 addrconf_dev_config net/ipv6/addrconf.c:3477 [inline] addrconf_init_auto_addrs+0x3f3/0x8f0 net/ipv6/addrconf.c:3571 addrconf_notify+0x6e2/0x19e0 net/ipv6/addrconf.c:3744 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2230 netif_state_change+0x165/0x3b0 net/core/dev.c:1584 linkwatch_do_dev+0x12b/0x160 net/core/link_watch.c:186 __linkwatch_run_queue+0x2aa/0x8a0 net/core/link_watch.c:244 linkwatch_event+0x8f/0xc0 net/core/link_watch.c:304 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 23: 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:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4842 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094 call_rcu_hurry include/linux/rcupdate.h:115 [inline] fib6_info_release include/net/ip6_fib.h:344 [inline] fib6_info_release include/net/ip6_fib.h:340 [inline] fib6_del_route net/ipv6/ip6_fib.c:2060 [inline] fib6_del+0xf3c/0x1770 net/ipv6/ip6_fib.c:2093 fib6_clean_node+0x424/0x5b0 net/ipv6/ip6_fib.c:2255 fib6_walk_continue+0x452/0x8d0 net/ipv6/ip6_fib.c:2177 fib6_walk+0x182/0x370 net/ipv6/ip6_fib.c:2225 fib6_clean_tree+0xd4/0x110 net/ipv6/ip6_fib.c:2305 __fib6_clean_all+0x107/0x2d0 net/ipv6/ip6_fib.c:2321 rt6_sync_down_dev net/ipv6/route.c:5004 [inline] rt6_disable_ip+0x2ec/0x990 net/ipv6/route.c:5009 addrconf_ifdown.isra.0+0x11d/0x1a90 net/ipv6/addrconf.c:3857 addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3780 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2230 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] dev_close_many+0x319/0x630 net/core/dev.c:1785 unregister_netdevice_many_notify+0x578/0x2700 net/core/dev.c:12047 unregister_netdevice_many net/core/dev.c:12140 [inline] default_device_exit_batch+0x853/0xaf0 net/core/dev.c:12644 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x363/0xab0 net/core/net_namespace.c:253 cleanup_net+0x408/0x890 net/core/net_namespace.c:686 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888032784000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of freed 512-byte region [ffff888032784000, ffff888032784200) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888032785000 pfn:0x32784 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b842c80 ffffea0000e2f010 ffff88801b8407c8 raw: ffff888032785000 0000000000100008 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b842c80 ffffea0000e2f010 ffff88801b8407c8 head: ffff888032785000 0000000000100008 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000c9e101 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 46, tgid 46 (kworker/u32:2), ts 372665041761, free_ts 372636635367 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] switchdev_deferred_enqueue+0x2b/0x2a0 net/switchdev/switchdev.c:117 switchdev_port_attr_set_defer net/switchdev/switchdev.c:183 [inline] switchdev_port_attr_set+0xb5/0x120 net/switchdev/switchdev.c:202 br_set_state+0x235/0x880 net/bridge/br_stp.c:52 br_init_port+0xc6/0x250 net/bridge/br_stp_if.c:39 br_stp_enable_port+0x15/0x50 net/bridge/br_stp_if.c:93 br_port_carrier_check+0x264/0x4c0 net/bridge/br_if.c:89 br_device_event+0x6a6/0xa00 net/bridge/br.c:96 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 page last free pid 5984 tgid 5984 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3186 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/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:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_lru_noprof+0x1d0/0x3b0 mm/slub.c:4216 sock_alloc_inode+0x25/0x1c0 net/socket.c:309 alloc_inode+0x61/0x240 fs/inode.c:346 new_inode_pseudo include/linux/fs.h:3364 [inline] sock_alloc+0x40/0x280 net/socket.c:622 __sock_create+0xc1/0x8d0 net/socket.c:1505 sock_create net/socket.c:1599 [inline] __sys_socket_create net/socket.c:1636 [inline] __sys_socket+0x14d/0x260 net/socket.c:1683 __do_sys_socket net/socket.c:1697 [inline] __se_sys_socket net/socket.c:1695 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1695 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888032783f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032783f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888032784000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888032784080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888032784100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================