==================================================================
BUG: KASAN: slab-use-after-free in __mutex_lock+0x157/0x1300
Read of size 8 at addr ffff8880393836b0 by task kworker/u8:0/12

CPU: 1 UID: 0 PID: 12 Comm: kworker/u8:0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: udp_tunnel_nic udp_tunnel_nic_device_sync_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_report+0xba/0x230
 kasan_report+0x117/0x150
 __mutex_lock+0x157/0x1300
 udp_tunnel_nic_device_sync_work+0x39/0xa10
 process_scheduled_works+0xaec/0x17a0
 worker_thread+0x89f/0xd90
 kthread+0x726/0x8b0
 ret_from_fork+0x51b/0xa40
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 25582:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_noprof+0x40c/0x7e0
 udp_tunnel_nic_netdevice_event+0x4c3/0x17d0
 notifier_call_chain+0x19d/0x3a0
 register_netdevice+0x17e2/0x1ca0
 nsim_create+0xb92/0x1100
 __nsim_dev_port_add+0x72a/0xb50
 nsim_dev_port_add_all+0x37/0xf0
 nsim_dev_reload_up+0x45f/0x7c0
 devlink_reload+0x50d/0x8e0
 devlink_nl_reload_doit+0xaaa/0xc80
 genl_family_rcv_msg_doit+0x22a/0x330
 genl_rcv_msg+0x61c/0x7a0
 netlink_rcv_skb+0x232/0x4b0
 genl_rcv+0x28/0x40
 netlink_unicast+0x80f/0x9b0
 netlink_sendmsg+0x813/0xb40
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x4d7/0x810
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1bd/0x2a0
 do_syscall_64+0xe2/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 25582:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1be/0x650
 udp_tunnel_nic_netdevice_event+0x11ed/0x17d0
 notifier_call_chain+0x19d/0x3a0
 unregister_netdevice_many_notify+0x186a/0x2370
 unregister_netdevice_queue+0x31f/0x360
 nsim_destroy+0x1e5/0x680
 __nsim_dev_port_del+0x14d/0x1b0
 nsim_dev_reload_destroy+0x288/0x490
 nsim_dev_reload_down+0x8a/0xc0
 devlink_reload+0x1d1/0x8e0
 devlink_nl_reload_doit+0xaaa/0xc80
 genl_family_rcv_msg_doit+0x22a/0x330
 genl_rcv_msg+0x61c/0x7a0
 netlink_rcv_skb+0x232/0x4b0
 genl_rcv+0x28/0x40
 netlink_unicast+0x80f/0x9b0
 netlink_sendmsg+0x813/0xb40
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x4d7/0x810
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1bd/0x2a0
 do_syscall_64+0xe2/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xbad/0xf90
 queue_work_on+0x106/0x1c0
 __udp_tunnel_nic_add_port+0xb71/0xd60
 udp_tunnel_push_rx_port+0x186/0x210
 geneve_offload_rx_ports+0xc7/0x150
 geneve_netdevice_event+0x6a/0x80
 notifier_call_chain+0x19d/0x3a0
 call_netdevice_notifiers+0x90/0xd0
 udp_tunnel_nic_netdevice_event+0xdef/0x17d0
 notifier_call_chain+0x19d/0x3a0
 register_netdevice+0x17e2/0x1ca0
 nsim_create+0xb92/0x1100
 __nsim_dev_port_add+0x72a/0xb50
 nsim_dev_port_add_all+0x37/0xf0
 nsim_dev_reload_up+0x45f/0x7c0
 devlink_reload+0x50d/0x8e0
 devlink_nl_reload_doit+0xaaa/0xc80
 genl_family_rcv_msg_doit+0x22a/0x330
 genl_rcv_msg+0x61c/0x7a0
 netlink_rcv_skb+0x232/0x4b0
 genl_rcv+0x28/0x40
 netlink_unicast+0x80f/0x9b0
 netlink_sendmsg+0x813/0xb40
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x4d7/0x810
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1bd/0x2a0
 do_syscall_64+0xe2/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xccf/0xf90
 queue_work_on+0x106/0x1c0
 __udp_tunnel_nic_add_port+0xb71/0xd60
 udp_tunnel_push_rx_port+0x186/0x210
 vxlan_offload_rx_ports+0x129/0x1f0
 vxlan_netdevice_event+0x111/0x480
 notifier_call_chain+0x19d/0x3a0
 call_netdevice_notifiers+0x90/0xd0
 udp_tunnel_nic_netdevice_event+0xdef/0x17d0
 notifier_call_chain+0x19d/0x3a0
 register_netdevice+0x17e2/0x1ca0
 nsim_create+0xb92/0x1100
 __nsim_dev_port_add+0x72a/0xb50
 nsim_dev_port_add_all+0x37/0xf0
 nsim_dev_reload_up+0x45f/0x7c0
 devlink_reload+0x50d/0x8e0
 devlink_nl_reload_doit+0xaaa/0xc80
 genl_family_rcv_msg_doit+0x22a/0x330
 genl_rcv_msg+0x61c/0x7a0
 netlink_rcv_skb+0x232/0x4b0
 genl_rcv+0x28/0x40
 netlink_unicast+0x80f/0x9b0
 netlink_sendmsg+0x813/0xb40
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x4d7/0x810
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1bd/0x2a0
 do_syscall_64+0xe2/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888039383600
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 176 bytes inside of
 freed 256-byte region [ffff888039383600, ffff888039383700)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x39382
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888100041b40 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888100041b40 0000000000000000 dead000000000001
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 00fff00000000001 ffffea0000e4e081 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 22924, tgid 22923 (syz.1.4525), ts 368240404132, free_ts 342692567980
 post_alloc_hook+0x228/0x280
 get_page_from_freelist+0x24dc/0x2580
 __alloc_frozen_pages_noprof+0x18d/0x380
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x86/0x3a0
 ___slab_alloc+0xd82/0x1760
 __slab_alloc+0x65/0x100
 __kmalloc_cache_noprof+0x40d/0x6e0
 siw_cm_alloc_work+0x93/0x380
 siw_create_listen+0x513/0x1100
 iw_cm_listen+0x166/0x230
 rdma_listen+0x911/0xd50
 cma_listen_on_dev+0x3f5/0x720
 cma_add_one+0x647/0xa30
 add_client_context+0x37c/0x7a0
 enable_device_and_get+0x19c/0x3e0
page last free pid 21456 tgid 21455 stack trace:
 __free_frozen_pages+0xbb0/0xd10
 __put_partials+0x146/0x170
 __slab_free+0x294/0x320
 qlist_free_all+0x97/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_node_track_caller_noprof+0x511/0x7f0
 kstrdup+0x42/0x100
 __kernfs_new_node+0xa9/0x8e0
 kernfs_new_node+0x102/0x210
 __kernfs_create_file+0x4b/0x2e0
 sysfs_add_file_mode_ns+0x238/0x300
 internal_create_group+0x673/0x1180
 sysfs_create_groups+0x59/0x120
 ib_setup_port_attrs+0xe1b/0x2140
 add_one_compat_dev+0x448/0x650

Memory state around the buggy address:
 ffff888039383580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888039383600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888039383680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff888039383700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888039383780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
