geneve1 speed is unknown, defaulting to 1000 ================================================================== BUG: KASAN: slab-use-after-free in siw_query_port+0x346/0x430 drivers/infiniband/sw/siw/siw_verbs.c:177 Read of size 4 at addr ffff88807d6660e8 by task kworker/1:17/13219 CPU: 1 PID: 13219 Comm: kworker/1:17 Not tainted 6.4.0-rc6-syzkaller-00049-g62d8779610bb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: infiniband ib_cache_event_task Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 siw_query_port+0x346/0x430 drivers/infiniband/sw/siw/siw_verbs.c:177 ib_cache_update+0x1ac/0xb00 drivers/infiniband/core/cache.c:1487 ib_cache_event_task+0xf3/0x1e0 drivers/infiniband/core/cache.c:1561 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 9267: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc_node+0xb8/0x230 mm/slab_common.c:973 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x72/0x180 mm/util.c:604 kvmalloc include/linux/slab.h:697 [inline] kvzalloc include/linux/slab.h:705 [inline] alloc_netdev_mqs+0x89/0xf30 net/core/dev.c:10628 rtnl_create_link+0x2ea/0xc10 net/core/rtnetlink.c:3332 rtnl_newlink_create net/core/rtnetlink.c:3455 [inline] __rtnl_newlink net/core/rtnetlink.c:3682 [inline] rtnl_newlink+0x1379/0x2010 net/core/rtnetlink.c:3695 rtnetlink_rcv_msg+0x825/0xf40 net/core/rtnetlink.c:6417 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x7c3/0x990 net/netlink/af_netlink.c:1365 netlink_sendmsg+0xa2a/0xd60 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] __sys_sendto+0x475/0x630 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5420: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] __kmem_cache_free+0x264/0x3c0 mm/slub.c:3799 device_release+0x95/0x1c0 kobject_cleanup lib/kobject.c:683 [inline] kobject_release lib/kobject.c:714 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x228/0x470 lib/kobject.c:731 netdev_run_todo+0xe5a/0xf50 net/core/dev.c:10402 default_device_exit_batch+0x5c9/0x630 net/core/dev.c:11394 ops_exit_list net/core/net_namespace.c:175 [inline] cleanup_net+0x767/0xb80 net/core/net_namespace.c:614 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88807d666000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 232 bytes inside of freed 4096-byte region [ffff88807d666000, ffff88807d667000) The buggy address belongs to the physical page: page:ffffea0001f59800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d660 head:ffffea0001f59800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880264f7b81 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff88801244f500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff8880264f7b81 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9267, tgid 9267 (syz-executor.4), ts 624229177767, free_ts 623103832525 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc_node_track_caller+0xa5/0x230 mm/slab_common.c:986 kmemdup+0x2a/0x60 mm/util.c:131 __devinet_sysctl_register+0xb0/0x2a0 net/ipv4/devinet.c:2578 devinet_sysctl_register+0x13a/0x1a0 net/ipv4/devinet.c:2630 inetdev_init+0x291/0x4c0 net/ipv4/devinet.c:286 inetdev_event+0x342/0x1580 net/ipv4/devinet.c:1538 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1935 [inline] call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers+0x149/0x1c0 net/core/dev.c:1987 register_netdevice+0x1349/0x1790 net/core/dev.c:10120 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x11f/0x2e0 mm/slub.c:3475 vm_area_dup+0x27/0x280 kernel/fork.c:504 __split_vma+0x1c7/0x7f0 mm/mmap.c:2248 do_vmi_align_munmap+0x3bd/0x1820 mm/mmap.c:2380 do_vmi_munmap+0x24a/0x2b0 mm/mmap.c:2530 mmap_region+0x811/0x2250 mm/mmap.c:2578 do_mmap+0x8c9/0xf70 mm/mmap.c:1394 vm_mmap_pgoff+0x1db/0x410 mm/util.c:543 Memory state around the buggy address: ffff88807d665f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d666000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807d666080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807d666100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807d666180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================