================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in __in6_dev_get include/net/addrconf.h:309 [inline] BUG: KASAN: use-after-free in ip6_ignore_linkdown include/net/addrconf.h:400 [inline] BUG: KASAN: use-after-free in find_match+0xb39/0xc90 net/ipv6/route.c:749 Read of size 8 at addr ffff88807477a320 by task syz-executor987/10731 CPU: 0 PID: 10731 Comm: syz-executor987 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __read_once_size include/linux/compiler.h:199 [inline] __in6_dev_get include/net/addrconf.h:309 [inline] ip6_ignore_linkdown include/net/addrconf.h:400 [inline] find_match+0xb39/0xc90 net/ipv6/route.c:749 __find_rr_leaf+0x14e/0x750 net/ipv6/route.c:837 find_rr_leaf net/ipv6/route.c:858 [inline] rt6_select net/ipv6/route.c:902 [inline] fib6_table_lookup+0x697/0xdb0 net/ipv6/route.c:2170 ip6_pol_route+0x1f6/0xa70 net/ipv6/route.c:2206 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:2264 fib6_rule_lookup+0x133/0x7d0 net/ipv6/fib6_rules.c:114 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:2276 ip6_route_input+0x5f0/0xa40 net/ipv6/route.c:2445 ip6_rcv_finish_core.isra.0+0x174/0x590 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x17a/0x310 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:306 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5198 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5312 process_backlog+0x226/0x780 net/core/dev.c:6144 napi_poll net/core/dev.c:6582 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6650 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:752 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x90/0xe0 kernel/locking/spinlock.c:191 Code: 48 c7 c0 b8 b0 b3 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 39 48 83 3d cf 84 c3 01 00 74 24 48 89 df 57 9d <0f> 1f 44 00 00 bf 01 00 00 00 e8 91 a8 60 f9 65 8b 05 82 f2 11 78 RSP: 0018:ffffc90001f178c8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1367617 RBX: 0000000000000286 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: 0000000000000286 RBP: ffffc90001f178d8 R08: ffff8880861d2100 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8bb0c108 R13: ffffffff8bb0c108 R14: ffff888081280000 R15: 0000000000000001 __debug_check_no_obj_freed lib/debugobjects.c:977 [inline] debug_check_no_obj_freed+0x20a/0x441 lib/debugobjects.c:998 free_pages_prepare mm/page_alloc.c:1168 [inline] __free_pages_ok+0x266/0xea0 mm/page_alloc.c:1420 free_compound_page+0x97/0xd0 mm/page_alloc.c:674 free_transhuge_page+0x2a7/0x3b0 mm/huge_memory.c:2860 __put_compound_page+0x90/0xd0 mm/swap.c:97 release_pages+0x679/0x1ac0 mm/swap.c:831 free_pages_and_swap_cache+0x2c3/0x3f0 mm/swap_state.c:296 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu+0x95/0x630 mm/mmu_gather.c:249 tlb_finish_mmu+0x98/0x3b0 mm/mmu_gather.c:328 exit_mmap+0x2da/0x530 mm/mmap.c:3132 __mmput kernel/fork.c:1082 [inline] mmput+0x179/0x4d0 kernel/fork.c:1103 exit_mm kernel/exit.c:485 [inline] do_exit+0xac2/0x2f50 kernel/exit.c:788 do_group_exit+0x135/0x360 kernel/exit.c:899 __do_sys_exit_group kernel/exit.c:910 [inline] __se_sys_exit_group kernel/exit.c:908 [inline] __x64_sys_exit_group+0x44/0x50 kernel/exit.c:908 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x442198 Code: Bad RIP value. RSP: 002b:00007ffcb7d043a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000442198 RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001 RBP: 00000000004c8790 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000001bbbbbb R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006dba60 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10731: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3623 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x68/0x100 mm/util.c:574 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [inline] alloc_netdev_mqs+0x98/0xe40 net/core/dev.c:9797 vti6_init_net+0x244/0x810 net/ipv6/ip6_vti.c:1119 ops_init+0xb3/0x420 net/core/net_namespace.c:137 setup_net+0x2d5/0x8b0 net/core/net_namespace.c:327 copy_net_ns+0x29e/0x5a0 net/core/net_namespace.c:468 create_new_namespaces+0x403/0xb50 kernel/nsproxy.c:108 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:229 ksys_unshare+0x444/0x980 kernel/fork.c:2955 __do_sys_unshare kernel/fork.c:3023 [inline] __se_sys_unshare kernel/fork.c:3021 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3021 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10731: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 __netdev_name_node_alt_destroy+0x1ff/0x2a0 net/core/dev.c:322 netdev_name_node_alt_destroy+0x57/0x80 net/core/dev.c:334 rtnl_alt_ifname net/core/rtnetlink.c:3518 [inline] rtnl_linkprop.isra.0+0x575/0x6f0 net/core/rtnetlink.c:3567 rtnl_dellinkprop+0x46/0x60 net/core/rtnetlink.c:3588 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88807477a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 800 bytes inside of 4096-byte region [ffff88807477a000, ffff88807477b000) The buggy address belongs to the page: page:ffffea0001d1de80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0001d1de08 ffffea000270ae08 ffff8880aa402000 raw: 0000000000000000 ffff88807477a000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88807477a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807477a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807477a300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807477a380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807477a400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================