0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 2097051 pages RAM 0 pages HighMem/MovableOnly 384519 pages reserved 0 pages cma reserved ================================================================== BUG: KASAN: use-after-free in rxe_queue_cleanup+0xf4/0x100 drivers/infiniband/sw/rxe/rxe_queue.c:193 Read of size 8 at addr ffff888019eec090 by task syz-executor.1/17505 CPU: 1 PID: 17505 Comm: syz-executor.1 Not tainted 5.16.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 rxe_queue_cleanup+0xf4/0x100 drivers/infiniband/sw/rxe/rxe_queue.c:193 rxe_qp_do_cleanup+0x5d/0xa60 drivers/infiniband/sw/rxe/rxe_qp.c:804 execute_in_process_context+0x37/0x150 kernel/workqueue.c:3359 rxe_elem_release+0x9f/0x180 drivers/infiniband/sw/rxe/rxe_pool.c:407 kref_put include/linux/kref.h:65 [inline] rxe_create_qp+0x32c/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:450 create_qp+0x5ac/0x960 drivers/infiniband/core/verbs.c:1241 ib_create_qp_kernel+0x9d/0x310 drivers/infiniband/core/verbs.c:1352 ib_create_qp include/rdma/ib_verbs.h:3722 [inline] create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2910 ib_mad_port_open drivers/infiniband/core/mad.c:2991 [inline] ib_mad_init_device+0xd4d/0x13f0 drivers/infiniband/core/mad.c:3082 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:720 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1419 [inline] ib_register_device+0x854/0xb50 drivers/infiniband/core/device.c:1365 rxe_register_device+0x2fe/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:1146 rxe_add+0x1331/0x1710 drivers/infiniband/sw/rxe/rxe.c:248 rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:543 rxe_newlink drivers/infiniband/sw/rxe/rxe.c:270 [inline] rxe_newlink+0xa9/0xd0 drivers/infiniband/sw/rxe/rxe.c:251 nldev_newlink+0x30a/0x560 drivers/infiniband/core/nldev.c:1717 rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1315 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1341 netlink_sendmsg+0x904/0xdf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f36cba6fb19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f36ca9c4188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f36cbb83020 RCX: 00007f36cba6fb19 RDX: 0000000000000000 RSI: 00000000200002c0 RDI: 0000000000000004 RBP: 00007f36cbac9f9f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffedbe3b39f R14: 00007f36ca9c4300 R15: 0000000000022000 Allocated by task 17505: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] rxe_queue_init+0x99/0x510 drivers/infiniband/sw/rxe/rxe_queue.c:66 rxe_qp_init_req drivers/infiniband/sw/rxe/rxe_qp.c:233 [inline] rxe_qp_from_init+0x844/0x1bf0 drivers/infiniband/sw/rxe/rxe_qp.c:347 rxe_create_qp+0x231/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:442 create_qp+0x5ac/0x960 drivers/infiniband/core/verbs.c:1241 ib_create_qp_kernel+0x9d/0x310 drivers/infiniband/core/verbs.c:1352 ib_create_qp include/rdma/ib_verbs.h:3722 [inline] create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2910 ib_mad_port_open drivers/infiniband/core/mad.c:2991 [inline] ib_mad_init_device+0xd4d/0x13f0 drivers/infiniband/core/mad.c:3082 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:720 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1419 [inline] ib_register_device+0x854/0xb50 drivers/infiniband/core/device.c:1365 rxe_register_device+0x2fe/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:1146 rxe_add+0x1331/0x1710 drivers/infiniband/sw/rxe/rxe.c:248 rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:543 rxe_newlink drivers/infiniband/sw/rxe/rxe.c:270 [inline] rxe_newlink+0xa9/0xd0 drivers/infiniband/sw/rxe/rxe.c:251 nldev_newlink+0x30a/0x560 drivers/infiniband/core/nldev.c:1717 rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1315 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1341 netlink_sendmsg+0x904/0xdf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 17505: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1749 slab_free mm/slub.c:3513 [inline] kfree+0xf6/0x560 mm/slub.c:4561 rxe_qp_from_init+0x161e/0x1bf0 drivers/infiniband/sw/rxe/rxe_qp.c:361 rxe_create_qp+0x231/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:442 create_qp+0x5ac/0x960 drivers/infiniband/core/verbs.c:1241 ib_create_qp_kernel+0x9d/0x310 drivers/infiniband/core/verbs.c:1352 ib_create_qp include/rdma/ib_verbs.h:3722 [inline] create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2910 ib_mad_port_open drivers/infiniband/core/mad.c:2991 [inline] ib_mad_init_device+0xd4d/0x13f0 drivers/infiniband/core/mad.c:3082 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:720 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1419 [inline] ib_register_device+0x854/0xb50 drivers/infiniband/core/device.c:1365 rxe_register_device+0x2fe/0x3b0 drivers/infiniband/sw/rxe/rxe_verbs.c:1146 rxe_add+0x1331/0x1710 drivers/infiniband/sw/rxe/rxe.c:248 rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:543 rxe_newlink drivers/infiniband/sw/rxe/rxe.c:270 [inline] rxe_newlink+0xa9/0xd0 drivers/infiniband/sw/rxe/rxe.c:251 nldev_newlink+0x30a/0x560 drivers/infiniband/core/nldev.c:1717 rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1315 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1341 netlink_sendmsg+0x904/0xdf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888019eec080 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 16 bytes inside of 64-byte region [ffff888019eec080, ffff888019eec0c0) The buggy address belongs to the page: page:ffffea000067bb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19eec flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888010c41640 raw: 0000000000000000 0000000000200020 00000001ffffffff 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 17505, ts 330179746329, free_ts 325825986865 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0x32d/0x4a0 mm/slub.c:1993 ___slab_alloc+0x918/0xfe0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] kmem_cache_alloc_node_trace+0x116/0x310 mm/slub.c:3284 kmalloc_node include/linux/slab.h:608 [inline] kzalloc_node include/linux/slab.h:735 [inline] __get_vm_area_node.constprop.0+0xd3/0x380 mm/vmalloc.c:2427 __vmalloc_node_range+0x12f/0xab0 mm/vmalloc.c:3055 vmalloc_user+0x67/0x80 mm/vmalloc.c:3200 rxe_queue_init+0x28e/0x510 drivers/infiniband/sw/rxe/rxe_queue.c:89 rxe_cq_from_init+0x8e/0x360 drivers/infiniband/sw/rxe/rxe_cq.c:65 rxe_create_cq+0x1fd/0x2d0 drivers/infiniband/sw/rxe/rxe_verbs.c:794 __ib_alloc_cq+0x278/0x11d0 drivers/infiniband/core/cq.c:241 ib_alloc_cq include/rdma/ib_verbs.h:3853 [inline] ib_mad_port_open drivers/infiniband/core/mad.c:2978 [inline] ib_mad_init_device+0xcc8/0x13f0 drivers/infiniband/core/mad.c:3082 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:720 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __vunmap+0x781/0xb70 mm/vmalloc.c:2632 __vfree+0x3c/0xd0 mm/vmalloc.c:2680 vfree+0x5a/0x90 mm/vmalloc.c:2711 kcov_put kernel/kcov.c:411 [inline] kcov_put+0x26/0x40 kernel/kcov.c:407 kcov_close+0xc/0x10 kernel/kcov.c:513 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xc14/0x2b40 kernel/exit.c:832 do_group_exit+0x125/0x310 kernel/exit.c:929 get_signal+0x47d/0x2220 kernel/signal.c:2852 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff888019eebf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888019eec000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff888019eec080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888019eec100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888019eec180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================