netdevsim netdevsim0 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 ================================================================== BUG: KASAN: slab-out-of-bounds in geneve_destroy_tunnels drivers/net/geneve.c:1913 [inline] BUG: KASAN: slab-out-of-bounds in geneve_exit_batch_rtnl+0x26d/0x300 drivers/net/geneve.c:1928 Read of size 8 at addr ffff888029b88dd0 by task kworker/u32:7/1141 CPU: 3 UID: 0 PID: 1141 Comm: kworker/u32:7 Not tainted 6.14.0-rc3-syzkaller-g2408a807bfc3 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: netns cleanup_net 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:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 geneve_destroy_tunnels drivers/net/geneve.c:1913 [inline] geneve_exit_batch_rtnl+0x26d/0x300 drivers/net/geneve.c:1928 cleanup_net+0x557/0xbf0 net/core/net_namespace.c:645 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 9614: 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:4294 [inline] __kmalloc_noprof+0x21c/0x510 mm/slub.c:4306 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] __register_sysctl_table+0xb4/0x1910 fs/proc/proc_sysctl.c:1376 __addrconf_sysctl_register+0x1a3/0x360 net/ipv6/addrconf.c:7220 addrconf_sysctl_register net/ipv6/addrconf.c:7268 [inline] addrconf_sysctl_register+0x15f/0x1f0 net/ipv6/addrconf.c:7257 ipv6_add_dev+0xa6f/0x13f0 net/ipv6/addrconf.c:456 addrconf_notify+0x53e/0x19c0 net/ipv6/addrconf.c:3646 notifier_call_chain+0xb7/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2141 call_netdevice_notifiers_extack net/core/dev.c:2179 [inline] call_netdevice_notifiers net/core/dev.c:2193 [inline] register_netdevice+0x17c2/0x1eb0 net/core/dev.c:10896 register_netdev+0x34/0x50 net/core/dev.c:10974 loopback_net_init+0x7a/0x170 drivers/net/loopback.c:217 ops_init+0x1df/0x5f0 net/core/net_namespace.c:138 setup_net+0x21f/0x860 net/core/net_namespace.c:362 copy_net_ns+0x2b4/0x6c0 net/core/net_namespace.c:516 create_new_namespaces+0x3ea/0xad0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x45d/0xa40 kernel/fork.c:3342 __do_sys_unshare kernel/fork.c:3413 [inline] __se_sys_unshare kernel/fork.c:3411 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3411 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:548 kvfree_call_rcu+0x76/0x470 mm/slab_common.c:1947 drop_sysctl_table+0x356/0x5f0 fs/proc/proc_sysctl.c:1518 unregister_sysctl_table fs/proc/proc_sysctl.c:1539 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1531 __addrconf_sysctl_unregister net/ipv6/addrconf.c:7250 [inline] addrconf_sysctl_unregister+0xf1/0x1c0 net/ipv6/addrconf.c:7278 addrconf_ifdown.isra.0+0x1520/0x1af0 net/ipv6/addrconf.c:4002 addrconf_notify+0x220/0x19c0 net/ipv6/addrconf.c:3772 notifier_call_chain+0xb7/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2141 call_netdevice_notifiers_extack net/core/dev.c:2179 [inline] call_netdevice_notifiers net/core/dev.c:2193 [inline] unregister_netdevice_many_notify+0xc8a/0x1f30 net/core/dev.c:11802 unregister_netdevice_many net/core/dev.c:11866 [inline] default_device_exit_batch+0x867/0xae0 net/core/dev.c:12351 ops_exit_list+0x128/0x180 net/core/net_namespace.c:177 cleanup_net+0x5c6/0xbf0 net/core/net_namespace.c:652 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888029b88000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1464 bytes to the right of allocated 2072-byte region [ffff888029b88000, ffff888029b88818) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29b88 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880316a3dc1 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b050280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000040004 00000000f5000000 ffff8880316a3dc1 head: 00fff00000000040 ffff88801b050280 0000000000000000 dead000000000001 head: 0000000000000000 0000000000040004 00000000f5000000 ffff8880316a3dc1 head: 00fff00000000003 ffffea0000a6e201 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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 0xd60c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6440, tgid 6440 (syz-executor), ts 83003570072, free_ts 83002829216 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 alloc_pages_mpol+0x1fc/0x540 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2587 [inline] new_slab+0x23d/0x330 mm/slub.c:2640 ___slab_alloc+0xc5d/0x1720 mm/slub.c:3826 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_node_noprof+0x2f0/0x510 mm/slub.c:4300 __kvmalloc_node_noprof+0xad/0x1a0 mm/util.c:662 alloc_netdev_mqs+0xd9/0x15d0 net/core/dev.c:11465 rtnl_create_link+0xc10/0xfa0 net/core/rtnetlink.c:3605 rtnl_newlink_create net/core/rtnetlink.c:3781 [inline] __rtnl_newlink net/core/rtnetlink.c:3907 [inline] rtnl_newlink+0x14c6/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1892 page last free pid 6440 tgid 6440 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 __put_partials+0x14c/0x170 mm/slub.c:3153 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/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:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] __kmalloc_cache_noprof+0x243/0x410 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] ref_tracker_alloc+0x17c/0x5b0 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4281 [inline] netdev_hold include/linux/netdevice.h:4310 [inline] netdev_hold include/linux/netdevice.h:4305 [inline] register_netdevice+0x166d/0x1eb0 net/core/dev.c:10883 macsec_newlink+0x4ba/0x1bd0 drivers/net/macsec.c:4199 rtnl_newlink_create net/core/rtnetlink.c:3796 [inline] __rtnl_newlink net/core/rtnetlink.c:3907 [inline] rtnl_newlink+0xb95/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2190 Memory state around the buggy address: ffff888029b88c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029b88d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029b88d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888029b88e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029b88e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================