================================================================== BUG: KASAN: use-after-free in __fib6_clean_all+0x21d/0x8a0 Read of size 8 at addr ffff88802e1fa000 by task syz-executor.3/23739 CPU: 0 PID: 23739 Comm: syz-executor.3 Not tainted 5.19.0-rc5-syzkaller-00187-ge8a4e1c1bb69 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:313 print_report+0xf4/0x210 mm/kasan/report.c:429 kasan_report+0xfb/0x130 mm/kasan/report.c:491 __fib6_clean_all+0x21d/0x8a0 rt6_sync_down_dev net/ipv6/route.c:4894 [inline] rt6_disable_ip+0x14c/0x8e0 net/ipv6/route.c:4899 addrconf_ifdown+0x16b/0x1bc0 net/ipv6/addrconf.c:3746 addrconf_notify+0x403/0xf80 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1945 [inline] call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] netdev_wait_allrefs_any net/core/dev.c:10227 [inline] netdev_run_todo+0x8fb/0x1090 net/core/dev.c:10341 tun_detach drivers/net/tun.c:704 [inline] tun_chr_close+0x11f/0x130 drivers/net/tun.c:3455 __fput+0x3b9/0x820 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x547/0x1ed0 kernel/exit.c:795 do_group_exit+0x23b/0x2f0 kernel/exit.c:925 __do_sys_exit_group kernel/exit.c:936 [inline] __se_sys_exit_group kernel/exit.c:934 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:934 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fcc6b089109 Code: Unable to access opcode bytes at RIP 0x7fcc6b0890df. RSP: 002b:00007ffe164ac878 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007ffe164aca20 RCX: 00007fcc6b089109 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000043 RBP: 0000000000000000 R08: 0000000000000025 R09: 00007ffe164aca20 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fcc6b0e302e R13: 000000000000001c R14: 0000000000000001 R15: 00007ffe164aca60 Allocated by task 23739: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:234 [inline] kmem_cache_alloc_trace+0x94/0x310 mm/slub.c:3284 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] fib6_net_init+0x1a6/0x800 net/ipv6/ip6_fib.c:2376 ops_init+0x313/0x430 net/core/net_namespace.c:134 setup_net+0x4bb/0xc10 net/core/net_namespace.c:325 copy_net_ns+0x359/0x5b0 net/core/net_namespace.c:471 create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11e/0x180 kernel/nsproxy.c:226 ksys_unshare+0x57f/0xb30 kernel/fork.c:3165 __do_sys_unshare kernel/fork.c:3236 [inline] __se_sys_unshare kernel/fork.c:3234 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3234 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:3126 netlink_release+0x1310/0x1730 net/netlink/af_netlink.c:815 __sock_release net/socket.c:650 [inline] sock_close+0xd7/0x260 net/socket.c:1365 __fput+0x3b9/0x820 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x134/0x160 kernel/entry/common.c:169 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:3126 netlink_release+0x1310/0x1730 net/netlink/af_netlink.c:815 __sock_release net/socket.c:650 [inline] sock_release+0x7a/0x140 net/socket.c:678 uevent_net_exit+0xbb/0x1d0 lib/kobject_uevent.c:799 ops_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x758/0xc50 net/core/net_namespace.c:594 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff88802e1fa000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 0 bytes inside of 2048-byte region [ffff88802e1fa000, ffff88802e1fa800) The buggy address belongs to the physical page: page:ffffea0000b87e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802e1fa000 pfn:0x2e1f8 head:ffffea0000b87e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001f5a008 ffffea00011bc008 ffff888011c42000 raw: ffff88802e1fa000 0000000000080005 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3633, tgid 3633 (syz-executor.0), ts 119380014044, free_ts 0 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4198 __alloc_pages+0x259/0x560 mm/page_alloc.c:5426 alloc_slab_page+0x70/0xf0 mm/slub.c:1824 allocate_slab+0x5e/0x520 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x42e/0xce0 mm/slub.c:3031 __slab_alloc mm/slub.c:3118 [inline] slab_alloc_node mm/slub.c:3209 [inline] __kmalloc_node+0x2c0/0x400 mm/slub.c:4490 kmalloc_node include/linux/slab.h:623 [inline] kzalloc_node include/linux/slab.h:744 [inline] qdisc_alloc+0x93/0x8a0 net/sched/sch_generic.c:941 qdisc_create_dflt+0x6c/0x2a0 net/sched/sch_generic.c:1000 mq_init+0x2d7/0x6e0 net/sched/sch_mq.c:90 qdisc_create_dflt+0x140/0x2a0 net/sched/sch_generic.c:1007 attach_default_qdiscs net/sched/sch_generic.c:1163 [inline] dev_activate+0x182/0x1020 net/sched/sch_generic.c:1216 __dev_open+0x3f1/0x510 net/core/dev.c:1441 __dev_change_flags+0x1e0/0x6d0 net/core/dev.c:8533 dev_change_flags+0x85/0x190 net/core/dev.c:8604 devinet_ioctl+0x933/0x1ab0 net/ipv4/devinet.c:1146 inet_ioctl+0x32d/0x400 net/ipv4/af_inet.c:968 page_owner free stack trace missing Memory state around the buggy address: ffff88802e1f9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802e1f9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802e1fa000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802e1fa080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802e1fa100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================