smc: removing ib device syz2
smbdirect: ib_dev[syz2] removed
==================================================================
BUG: KASAN: slab-use-after-free in kobject_uevent_net_broadcast+0x1
BUG: KASAN: slab-use-after-free in kobject_uevent_net_broadcast+0x12c/0x560
Read of size 8 at addr ffff8881126fa9d0 by task kworker/u10:15/14575

CPU: 0 UID: 0 PID: 14575 Comm: kworker/u10:15 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 17145:
 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
 unshare_nsproxy_namespaces+0x149/0x190
 ksys_unshare+0x5a7/0x950
 __x64_sys_unshare+0x38/0x50
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 17145:
 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
 unshare_nsproxy_namespaces+0x149/0x190
 ksys_unshare+0x5a7/0x950
 __x64_sys_unshare+0x38/0x50
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1126fa
flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000000 ffff888100041780 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000400040 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 5338, tgid 5338 (dhcpcd), ts 46560482483
 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_noprof+0x47b/0x720
 security_sk_alloc+0x52/0x360
 sk_prot_alloc+0x101/0x210
 sk_alloc+0x3a/0x390
 unix_create1+0xb0/0x7c0
 unix_create+0x14c/0x1d0
 __sock_create+0x4b3/0x9d0
 __sys_socketpair+0x1c4/0x560
 __x64_sys_socketpair+0x9b/0xb0
 do_syscall_64+0x166/0x520
page last free pid 5575 tgid 5575 ts 46042237790 stack trace:
 __free_frozen_pages+0xc93/0xd90
 tlb_finish_mmu+0x13e/0x220
 unmap_region+0x2a5/0x330
 vms_complete_munmap_vmas+0x427/0xbe0
 do_vmi_align_munmap+0x3b7/0x4b0
 do_vmi_munmap+0x252/0x2d0
 __vm_munmap+0x241/0x3e0
 __x64_sys_munmap+0x60/0x70
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881126fa880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
 ffff8881126fa900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
>ffff8881126fa980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
                                                 ^
 ffff8881126faa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
 ffff8881126faa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
==================================================================
