bridge0 speed is unknown, defaulting to 1000 ================================================================== BUG: KASAN: slab-use-after-free in siw_query_port+0x37b/0x3e0 drivers/infiniband/sw/siw/siw_verbs.c:177 Read of size 4 at addr ffff8880486c00e8 by task kworker/0:7/10678 CPU: 0 PID: 10678 Comm: kworker/0:7 Not tainted 6.5.0-rc1-syzkaller-00172-g4bdf79d686b4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Workqueue: infiniband ib_cache_event_task Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 siw_query_port+0x37b/0x3e0 drivers/infiniband/sw/siw/siw_verbs.c:177 iw_query_port drivers/infiniband/core/device.c:2049 [inline] ib_query_port drivers/infiniband/core/device.c:2090 [inline] ib_query_port+0x3cf/0x8a0 drivers/infiniband/core/device.c:2082 ib_cache_update.part.0+0xd9/0x920 drivers/infiniband/core/cache.c:1487 ib_cache_update drivers/infiniband/core/cache.c:1561 [inline] ib_cache_event_task+0x1c2/0x290 drivers/infiniband/core/cache.c:1561 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2597 worker_thread+0x687/0x1110 kernel/workqueue.c:2748 kthread+0x33a/0x430 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 18036: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc_node+0x60/0x100 mm/slab_common.c:992 kmalloc_node include/linux/slab.h:602 [inline] kvmalloc_node+0x6f/0x1a0 mm/util.c:604 kvmalloc include/linux/slab.h:720 [inline] kvzalloc include/linux/slab.h:728 [inline] alloc_netdev_mqs+0x9b/0x1240 net/core/dev.c:10594 rtnl_create_link+0xc9c/0xfd0 net/core/rtnetlink.c:3336 rtnl_newlink_create net/core/rtnetlink.c:3462 [inline] __rtnl_newlink+0x1075/0x18c0 net/core/rtnetlink.c:3689 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3702 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x539/0x800 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x93c/0xe30 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:748 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2494 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2548 __sys_sendmsg+0x117/0x1e0 net/socket.c:2577 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 29326: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15e/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1792 [inline] slab_free_freelist_hook+0x10b/0x1e0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3814 kvfree+0x47/0x50 mm/util.c:650 device_release+0xa1/0x240 drivers/base/core.c:2484 kobject_cleanup lib/kobject.c:682 [inline] kobject_release lib/kobject.c:713 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1f7/0x5b0 lib/kobject.c:730 netdev_run_todo+0x7dd/0x11d0 net/core/dev.c:10366 rtnl_unlock net/core/rtnetlink.c:151 [inline] rtnetlink_rcv_msg+0x446/0xd30 net/core/rtnetlink.c:6425 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x539/0x800 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x93c/0xe30 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:748 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2494 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2548 __sys_sendmsg+0x117/0x1e0 net/socket.c:2577 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x4a/0x330 kernel/workqueue.c:1553 __queue_work+0x5f5/0x1040 kernel/workqueue.c:1714 queue_work_on+0xed/0x110 kernel/workqueue.c:1744 br_multicast_dev_del+0xe8/0x240 net/bridge/br_multicast.c:4359 br_dev_uninit+0x1d/0x70 net/bridge/br_device.c:164 unregister_netdevice_many_notify+0xbcd/0x19a0 net/core/dev.c:10870 rtnl_delete_link net/core/rtnetlink.c:3214 [inline] rtnl_dellink+0x3c1/0xae0 net/core/rtnetlink.c:3266 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x539/0x800 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x93c/0xe30 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:748 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2494 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2548 __sys_sendmsg+0x117/0x1e0 net/socket.c:2577 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x4a/0x330 kernel/workqueue.c:1553 __queue_work+0x5f5/0x1040 kernel/workqueue.c:1714 queue_work_on+0xed/0x110 kernel/workqueue.c:1744 queue_work include/linux/workqueue.h:506 [inline] schedule_work include/linux/workqueue.h:567 [inline] __rhashtable_remove_fast_one include/linux/rhashtable.h:1069 [inline] __rhashtable_remove_fast include/linux/rhashtable.h:1093 [inline] rhashtable_remove_fast include/linux/rhashtable.h:1122 [inline] fdb_delete+0x1053/0x11a0 net/bridge/br_fdb.c:330 fdb_delete_local+0x566/0x740 net/bridge/br_fdb.c:368 br_fdb_delete_by_port+0x2a6/0x320 net/bridge/br_fdb.c:750 br_dev_delete+0xe5/0x1a0 net/bridge/br_if.c:391 rtnl_delete_link net/core/rtnetlink.c:3213 [inline] rtnl_dellink+0x3b1/0xae0 net/core/rtnetlink.c:3266 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2549 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x539/0x800 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x93c/0xe30 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:748 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2494 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2548 __sys_sendmsg+0x117/0x1e0 net/socket.c:2577 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880486c0000 which belongs to the cache kmalloc-cg-8k of size 8192 The buggy address is located 232 bytes inside of freed 8192-byte region [ffff8880486c0000, ffff8880486c2000) The buggy address belongs to the physical page: page:ffffea000121b000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x486c0 head:ffffea000121b000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888034033ca1 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff88801284f640 0000000000000000 0000000000000001 raw: 0000000000000000 0000000000020002 00000001ffffffff ffff888034033ca1 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd60c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5071, tgid 5071 (syz-executor.1), ts 131026667215, free_ts 24833111819 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x24e/0x380 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0x8bc/0x1570 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] __kmem_cache_alloc_node+0x137/0x350 mm/slub.c:3509 __do_kmalloc_node mm/slab_common.c:984 [inline] __kmalloc_node+0x4f/0x100 mm/slab_common.c:992 kmalloc_node include/linux/slab.h:602 [inline] kvmalloc_node+0x6f/0x1a0 mm/util.c:604 kvmalloc include/linux/slab.h:720 [inline] kvzalloc include/linux/slab.h:728 [inline] alloc_netdev_mqs+0x9b/0x1240 net/core/dev.c:10594 rtnl_create_link+0xc9c/0xfd0 net/core/rtnetlink.c:3336 rtnl_newlink_create net/core/rtnetlink.c:3462 [inline] __rtnl_newlink+0x1075/0x18c0 net/core/rtnetlink.c:3689 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3702 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6424 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2549 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443 free_contig_range+0xb6/0x190 mm/page_alloc.c:6395 destroy_args+0x686/0x940 mm/debug_vm_pgtable.c:1029 debug_vm_pgtable+0x2339/0x3ff0 mm/debug_vm_pgtable.c:1410 do_one_initcall+0x117/0x630 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x5bd/0x8f0 init/main.c:1546 kernel_init+0x1c/0x2a0 init/main.c:1437 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff8880486bff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880486c0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880486c0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880486c0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880486c0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================