bridge0 speed is unknown, defaulting to 1000 ================================================================== BUG: KASAN: use-after-free in siw_query_port+0x342/0x430 drivers/infiniband/sw/siw/siw_verbs.c:177 Read of size 4 at addr ffff88805a05c0e0 by task kworker/0:0/7 CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.1.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: infiniband ib_cache_event_task Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 siw_query_port+0x342/0x430 drivers/infiniband/sw/siw/siw_verbs.c:177 ib_cache_update+0x1a8/0xaf0 drivers/infiniband/core/cache.c:1483 ib_cache_event_task+0xef/0x1e0 drivers/infiniband/core/cache.c:1557 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 5271: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node+0xb3/0x230 mm/slab_common.c:943 kmalloc_node include/linux/slab.h:583 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:710 [inline] kvzalloc include/linux/slab.h:718 [inline] alloc_netdev_mqs+0x85/0xeb0 net/core/dev.c:10623 rtnl_create_link+0x2e9/0xa30 net/core/rtnetlink.c:3263 rtnl_newlink_create net/core/rtnetlink.c:3380 [inline] __rtnl_newlink net/core/rtnetlink.c:3610 [inline] rtnl_newlink+0x1403/0x2050 net/core/rtnetlink.c:3623 rtnetlink_rcv_msg+0x818/0xff0 net/core/rtnetlink.c:6121 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2507 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline] netlink_unicast+0x7d8/0x970 net/netlink/af_netlink.c:1352 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1874 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x480/0x600 net/socket.c:2148 __do_sys_sendto net/socket.c:2160 [inline] __se_sys_sendto net/socket.c:2156 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2156 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 7827: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674 device_release+0x91/0x1c0 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x224/0x460 lib/kobject.c:729 netdev_run_todo+0xe56/0xf40 net/core/dev.c:10413 br_ioctl_stub+0x41e/0xaa0 net/bridge/br_ioctl.c:437 br_ioctl_call net/socket.c:1178 [inline] sock_ioctl+0x292/0x770 net/socket.c:1275 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xb4b/0xf90 kernel/workqueue.c:1520 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] br_multicast_del_mdb_entry net/bridge/br_multicast.c:620 [inline] br_multicast_dev_del+0x33e/0x5e0 net/bridge/br_multicast.c:4192 br_dev_uninit+0x1a/0x70 net/bridge/br_device.c:169 unregister_netdevice_many+0x11d7/0x17a0 net/core/dev.c:10899 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:10813 br_del_bridge+0xb5/0xe0 net/bridge/br_if.c:495 br_ioctl_stub+0x40d/0xaa0 br_ioctl_call net/socket.c:1178 [inline] sock_ioctl+0x292/0x770 net/socket.c:1275 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xb4b/0xf90 kernel/workqueue.c:1520 queue_work_on+0x14b/0x250 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:573 [inline] __rhashtable_remove_fast_one include/linux/rhashtable.h:1059 [inline] __rhashtable_remove_fast include/linux/rhashtable.h:1083 [inline] rhashtable_remove_fast+0xd63/0xe20 include/linux/rhashtable.h:1112 br_multicast_del_mdb_entry net/bridge/br_multicast.c:616 [inline] br_multicast_dev_del+0x153/0x5e0 net/bridge/br_multicast.c:4192 br_dev_uninit+0x1a/0x70 net/bridge/br_device.c:169 unregister_netdevice_many+0x11d7/0x17a0 net/core/dev.c:10899 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:10813 br_del_bridge+0xb5/0xe0 net/bridge/br_if.c:495 br_ioctl_stub+0x40d/0xaa0 br_ioctl_call net/socket.c:1178 [inline] sock_ioctl+0x292/0x770 net/socket.c:1275 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88805a05c000 which belongs to the cache kmalloc-cg-8k of size 8192 The buggy address is located 224 bytes inside of 8192-byte region [ffff88805a05c000, ffff88805a05e000) The buggy address belongs to the physical page: page:ffffea0001681600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5a058 head:ffffea0001681600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00016f8e00 dead000000000004 ffff888017c4c3c0 raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000 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 3638, tgid 3638 (syz-executor), ts 70629236843, free_ts 17177223248 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4290 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5558 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node+0xa2/0x230 mm/slab_common.c:943 kmalloc_node include/linux/slab.h:583 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:710 [inline] kvzalloc include/linux/slab.h:718 [inline] alloc_netdev_mqs+0x85/0xeb0 net/core/dev.c:10623 nsim_create+0x78/0x3f0 drivers/net/netdevsim/netdev.c:350 __nsim_dev_port_add+0x6ba/0xb10 drivers/net/netdevsim/dev.c:1393 nsim_dev_port_add_all+0x33/0xe0 drivers/net/netdevsim/dev.c:1451 nsim_drv_probe+0x80e/0xb20 drivers/net/netdevsim/dev.c:1605 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3464 free_contig_range+0x9a/0x150 mm/page_alloc.c:9518 destroy_args+0xfe/0x997 mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x416/0x46b mm/debug_vm_pgtable.c:1354 do_one_initcall+0x265/0x8f0 init/main.c:1298 do_initcall_level+0x157/0x207 init/main.c:1371 do_initcalls+0x49/0x86 init/main.c:1387 kernel_init_freeable+0x45c/0x60f init/main.c:1626 kernel_init+0x19/0x290 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88805a05bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805a05c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88805a05c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805a05c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805a05c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================