netdevsim netdevsim0 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 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: use-after-free in ovs_ct_limit_exit net/openvswitch/conntrack.c:1909 [inline] BUG: KASAN: use-after-free in ovs_ct_exit+0x2df/0x4a0 net/openvswitch/conntrack.c:2303 Read of size 8 at addr ffff8880187fb100 by task kworker/u4:3/23216 CPU: 0 PID: 23216 Comm: kworker/u4:3 Not tainted 5.15.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x2d6 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 ovs_ct_limit_exit net/openvswitch/conntrack.c:1909 [inline] ovs_ct_exit+0x2df/0x4a0 net/openvswitch/conntrack.c:2303 ovs_exit_net+0x19c/0xbc0 net/openvswitch/datapath.c:2608 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:168 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:591 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 6149: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa1/0xd0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x1e4/0x480 mm/slab.c:3575 kmalloc include/linux/slab.h:591 [inline] ovs_ct_limit_set_zone_limit net/openvswitch/conntrack.c:1972 [inline] ovs_ct_limit_cmd_set+0x3dd/0xc70 net/openvswitch/conntrack.c:2148 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:731 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:792 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1935 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 22183: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xd1/0x110 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] __cache_free mm/slab.c:3445 [inline] kmem_cache_free_bulk+0x67/0x1e0 mm/slab.c:3767 kfree_bulk include/linux/slab.h:448 [inline] kfree_rcu_work+0x51c/0xa10 kernel/rcu/tree.c:3275 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xa7/0xd0 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x990 kernel/rcu/tree.c:3552 ovs_ct_limit_exit net/openvswitch/conntrack.c:1911 [inline] ovs_ct_exit+0x21e/0x4a0 net/openvswitch/conntrack.c:2303 ovs_exit_net+0x19c/0xbc0 net/openvswitch/datapath.c:2608 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:168 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:591 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff8880187fb100 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8880187fb100, ffff8880187fb140) The buggy address belongs to the page: page:ffffea000061fec0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880187fb900 pfn:0x187fb flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000098c408 ffffea00007a2c48 ffff888010c40200 raw: ffff8880187fb900 ffff8880187fb000 000000010000001a 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x242220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 6613, ts 271388724393, free_ts 271197926067 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x460 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc_track_caller+0x3d3/0x4d0 mm/slab.c:3717 kmemdup+0x23/0x50 mm/util.c:128 kmemdup include/linux/fortify-string.h:270 [inline] sctp_addr_wq_mgmt+0x417/0x7d0 net/sctp/protocol.c:752 sctp_inet6addr_event+0x6e5/0x910 net/sctp/ipv6.c:94 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 atomic_notifier_call_chain+0x70/0x180 kernel/notifier.c:198 ipv6_add_addr+0x1705/0x1f00 net/ipv6/addrconf.c:1159 inet6_addr_add+0x410/0xae0 net/ipv6/addrconf.c:2952 inet6_rtm_newaddr+0xf00/0x1970 net/ipv6/addrconf.c:4887 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 slab_destroy mm/slab.c:1627 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1647 cache_flusharray mm/slab.c:3418 [inline] ___cache_free+0x4c6/0x610 mm/slab.c:3480 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x4e/0x110 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x92/0xa0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc mm/slab.c:3323 [inline] kmem_cache_alloc_trace+0x256/0x480 mm/slab.c:3573 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_info_alloc+0xc1/0x210 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x33e/0x1aa0 net/ipv6/route.c:3754 ip6_route_add+0x24/0x150 net/ipv6/route.c:3848 addrconf_add_mroute+0x1e1/0x310 net/ipv6/addrconf.c:2486 addrconf_add_dev+0x162/0x1d0 net/ipv6/addrconf.c:2504 addrconf_dev_config+0x1ec/0x420 net/ipv6/addrconf.c:3359 addrconf_notify+0xdc2/0x1bb0 net/ipv6/addrconf.c:3608 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 Memory state around the buggy address: ffff8880187fb000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880187fb080: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880187fb100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880187fb180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880187fb200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================