smc: removing ib device syz1 smbdirect: ib_dev[syz1] removed ================================================================== BUG: KASAN: slab-use-after-free in kobject_uevent_net_bro BUG: KASAN: slab-use-after-free in kobject_uevent_net_broadcast+0x12c/0x560 lib/kobject_uevent.c:415 Read of size 8 at addr ffff8880284f3050 by task kworker/u8:10/5829 CPU: 0 UID: 0 PID: 5829 Comm: kworker/u8:10 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: ib-unreg-wq ib_unregister_work Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 kobject_uevent_net_broadcast+0x12c/0x560 lib/kobject_uevent.c:415 kobject_uevent_env+0x566/0x9e0 lib/kobject_uevent.c:611 device_del+0x74d/0x8f0 drivers/base/core.c:3983 remove_one_compat_dev drivers/infiniband/core/device.c:1036 [inline] remove_compat_devs drivers/infiniband/core/device.c:1047 [inline] disable_device+0x248/0x330 drivers/infiniband/core/device.c:1339 __ib_unregister_device+0x2c9/0x400 drivers/infiniband/core/device.c:1571 ib_unregister_work+0x19/0x30 drivers/infiniband/core/device.c:1683 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 17011: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x31c/0x600 mm/slub.c:5680 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] uevent_net_init+0xdb/0x2d0 lib/kobject_uevent.c:782 ops_init+0x35d/0x5d0 net/core/net_namespace.c:137 setup_net+0x118/0x350 net/core/net_namespace.c:443 copy_net_ns+0x536/0x770 net/core/net_namespace.c:582 create_new_namespaces+0x3f0/0x6b0 kernel/nsproxy.c:132 unshare_nsproxy_namespaces+0x144/0x190 kernel/nsproxy.c:234 ksys_unshare+0x53c/0x890 kernel/fork.c:3282 __do_sys_unshare kernel/fork.c:3344 [inline] __se_sys_unshare kernel/fork.c:3342 [inline] __x64_sys_unshare+0x38/0x50 kernel/fork.c:3342 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 17011: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2780 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x1c5/0x650 mm/slub.c:6923 ops_exit_list net/core/net_namespace.c:200 [inline] ops_undo_list+0x451/0x8f0 net/core/net_namespace.c:253 setup_net+0x2f6/0x350 net/core/net_namespace.c:459 copy_net_ns+0x536/0x770 net/core/net_namespace.c:582 create_new_namespaces+0x3f0/0x6b0 kernel/nsproxy.c:132 unshare_nsproxy_namespaces+0x144/0x190 kernel/nsproxy.c:234 ksys_unshare+0x53c/0x890 kernel/fork.c:3282 __do_sys_unshare kernel/fork.c:3344 [inline] __se_sys_unshare kernel/fork.c:3342 [inline] __x64_sys_unshare+0x38/0x50 kernel/fork.c:3342 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880284f3040 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of freed 32-byte region [ffff8880284f3040, ffff8880284f3060) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880284f3440 pfn:0x284f3 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801b041780 ffffea0001d817d0 ffffea0000ce6c50 raw: ffff8880284f3440 000000000040002d 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5147, tgid 5147 (v4l_id), ts 39032021114 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1854 prep_new_page mm/page_alloc.c:1862 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3933 __alloc_frozen_pages_noprof+0x1fc/0x400 mm/page_alloc.c:5441 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab+0x7d/0x5e0 mm/slub.c:3499 new_slab mm/slub.c:3550 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7539 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __kmalloc_cache_noprof+0x396/0x600 mm/slub.c:5676 _kmalloc_noprof include/linux/slab.h:991 [inline] slab_free_hook mm/slub.c:2732 [inline] slab_free mm/slub.c:6630 [inline] kmem_cache_free+0x156/0x650 mm/slub.c:6757 __fput_deferred+0x2ae/0x390 fs/file_table.c:568 fput_close+0x11f/0x240 fs/file_table.c:630 path_openat+0x16df/0x1da0 fs/namei.c:5018 do_file_open+0x23e/0x4a0 fs/namei.c:5038 do_sys_openat2+0x115/0x200 fs/open.c:1442 do_sys_open fs/open.c:1448 [inline] __do_sys_openat fs/open.c:1464 [inline] __se_sys_openat fs/open.c:1459 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1459 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5149 tgid 5149 ts 39019808003 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1401 [inline] __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2952 tlb_batch_list_free mm/mmu_gather.c:161 [inline] tlb_finish_mmu+0x13e/0x220 mm/mmu_gather.c:532 exit_mmap+0x4b2/0x9f0 mm/mmap.c:1328 __mmput+0x118/0x420 kernel/fork.c:1192 exec_mm_put_old fs/exec.c:920 [inline] setup_new_exec+0x30d/0x360 fs/exec.c:1395 load_elf_binary+0xbc0/0x28d0 fs/binfmt_elf.c:1024 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1809 [inline] bprm_execve+0x930/0x1590 fs/exec.c:1865 do_execveat_common+0x99f/0xbd0 fs/exec.c:1963 __do_sys_execve fs/exec.c:2036 [inline] __se_sys_execve fs/exec.c:2030 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:2030 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880284f2f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880284f2f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880284f3000: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff8880284f3080: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff8880284f3100: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================