hsr0 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 ffff88808090c0e0 by task kworker/1:1/1772 CPU: 1 PID: 1772 Comm: kworker/1:1 Not tainted 6.1.43-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 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:1487 ib_cache_event_task+0xef/0x1e0 drivers/infiniband/core/cache.c:1561 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 798: 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:955 [inline] __kmalloc_node+0xb3/0x230 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] kvzalloc include/linux/slab.h:714 [inline] alloc_netdev_mqs+0x85/0xeb0 net/core/dev.c:10587 rtnl_create_link+0x2e9/0xa30 net/core/rtnetlink.c:3249 rtnl_newlink_create net/core/rtnetlink.c:3366 [inline] __rtnl_newlink net/core/rtnetlink.c:3593 [inline] rtnl_newlink+0x1350/0x1fa0 net/core/rtnetlink.c:3606 rtnetlink_rcv_msg+0x776/0xf00 net/core/rtnetlink.c:6103 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2525 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline] netlink_unicast+0x7bf/0x990 net/netlink/af_netlink.c:1354 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1903 sock_sendmsg_nosec net/socket.c:716 [inline] sock_sendmsg net/socket.c:736 [inline] __sys_sendto+0x471/0x5f0 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 4872: 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:10377 default_device_exit_batch+0x5c1/0x630 net/core/dev.c:11341 ops_exit_list net/core/net_namespace.c:174 [inline] cleanup_net+0x763/0xb60 net/core/net_namespace.c:601 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 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 kvfree_call_rcu+0x116/0x8c0 kernel/rcu/tree.c:3355 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1729 unregister_sysctl_table+0x86/0x130 fs/proc/proc_sysctl.c:1767 ipv4_sysctl_exit_net+0x7e/0x90 net/ipv4/sysctl_net_ipv4.c:1445 ops_exit_list net/core/net_namespace.c:169 [inline] setup_net+0x8ac/0xb90 net/core/net_namespace.c:355 copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:478 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226 ksys_unshare+0x580/0xb20 kernel/fork.c:3196 __do_sys_unshare kernel/fork.c:3267 [inline] __se_sys_unshare kernel/fork.c:3265 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3265 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88808090c000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 224 bytes inside of 4096-byte region [ffff88808090c000, ffff88808090d000) The buggy address belongs to the physical page: page:ffffea0002024200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x80908 head:ffffea0002024200 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff8880183efb41 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff88801244c280 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff8880183efb41 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 30032, tgid 30027 (syz-executor.4), ts 2298169682154, free_ts 2297332359650 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 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+0xa71/0x1080 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 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] snmp6_alloc_dev net/ipv6/addrconf.c:352 [inline] ipv6_add_dev+0x5a7/0x1180 net/ipv6/addrconf.c:402 addrconf_notify+0x7a6/0xf60 net/ipv6/addrconf.c:3557 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1945 [inline] call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:1997 register_netdevice+0x12cc/0x1700 net/core/dev.c:10097 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x21f/0x700 net/ipv4/ip_tunnel.c:1073 ops_init+0x356/0x600 net/core/net_namespace.c:135 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1460 [inline] free_pcp_prepare mm/page_alloc.c:1510 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388 free_unref_page+0x98/0x570 mm/page_alloc.c:3484 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x50/0x370 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:679 [inline] jbd2_alloc_handle include/linux/jbd2.h:1596 [inline] new_handle fs/jbd2/transaction.c:476 [inline] jbd2__journal_start+0x144/0x5c0 fs/jbd2/transaction.c:503 __ext4_journal_start_sb+0x19b/0x410 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] __ext4_unlink+0x412/0xba0 fs/ext4/namei.c:3260 ext4_unlink+0x1d5/0x670 fs/ext4/namei.c:3319 vfs_unlink+0x359/0x5f0 fs/namei.c:4252 do_unlinkat+0x49d/0x940 fs/namei.c:4320 __do_sys_unlink fs/namei.c:4368 [inline] __se_sys_unlink fs/namei.c:4366 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4366 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88808090bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808090c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808090c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808090c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808090c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================