==================================================================
BUG: KASAN: slab-use-after-free in kobject_uevent_net_broadcast+0x12c/0x560
Read of size 8 at addr ffff8881ad2e1d10 by task kworker/u10:18/7645

CPU: 0 UID: 0 PID: 7645 Comm: kworker/u10:18 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: ib-unreg-wq ib_unregister_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 kobject_uevent_net_broadcast+0x12c/0x560
 kobject_uevent_env+0x566/0x9e0
 device_del+0x74d/0x8f0
 disable_device+0x248/0x330
 __ib_unregister_device+0x2c9/0x400
 ib_unregister_work+0x19/0x30
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 11470:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x321/0x600
 uevent_net_init+0xdb/0x2d0
 ops_init+0x35d/0x5d0
 setup_net+0x118/0x350
 copy_net_ns+0x53b/0x780
 create_new_namespaces+0x3f0/0x6b0
 copy_namespaces+0x432/0x4b0
 copy_process+0x1ec0/0x43e0
 kernel_clone+0x2d7/0x940
 __x64_sys_clone+0x1b6/0x230
 do_syscall_64+0x166/0x520
 entry_SY
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 11470:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 ops_undo_list+0x43d/0x8d0
 setup_net+0x2f6/0x350
 copy_net_ns+0x53b/0x780
 create_new_namespaces+0x3f0/0x6b0
 copy_namespaces+0x432/0x4b0
 copy_process+0x1ec0/0x43e0
 kernel_clone+0x2d7/0x940
 __x64_sys_clone+0x1b6/0x230
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8881ad2e1d00
 which belongs to the cache kmalloc-32 of size 32
The buggy address is located 16 bytes inside of
 freed 32-byte region [ffff8881ad2e1d00, ffff8881ad2e1d20)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8881ad2e1940 pfn:0x1ad2e1
flags: 0x57ff00000000200(workingset|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000200 ffff888100041780 ffffea0006efb5d0 ffffea0006f88050
raw: ffff8881ad2e1940 0000000000400019 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5703, tgid 5703 (kworker/1:5), ts 78720558689
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_cache_noprof+0x39b/0x600
 nsim_fib6_rt_nh_add+0x53/0x210
 nsim_fib_event+0x214e/0xa3a0
 nsim_fib_event_work+0x244/0x3b0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
page last free pid 24 tgid 24 ts 78713043696 stack trace:
 __free_frozen_pages+0xc93/0xd90
 tlb_remove_table_rcu+0x85/0x100
 rcu_core+0x926/0x1260
 handle_softirqs+0x226/0x860
 run_ksoftirqd+0x36/0x60
 smpboot_thread_fn+0x565/0xa70
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff8881ad2e1c00: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc
 ffff8881ad2e1c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
>ffff8881ad2e1d00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
                         ^
 ffff8881ad2e1d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
 ffff8881ad2e1e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
==================================================================
