================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xdc/0xf5 lib/list_debug.c:54 Read of size 8 at addr ffff888080f993e0 by task syz-executor.2/9092 CPU: 0 PID: 9092 Comm: syz-executor.2 Not tainted 4.14.159-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __list_del_entry_valid+0xdc/0xf5 lib/list_debug.c:54 __list_del_entry include/linux/list.h:117 [inline] list_del include/linux/list.h:125 [inline] cma_cancel_listens drivers/infiniband/core/cma.c:1603 [inline] cma_cancel_operation drivers/infiniband/core/cma.c:1631 [inline] cma_cancel_operation+0x28c/0x960 drivers/infiniband/core/cma.c:1619 rdma_destroy_id+0x95/0xb70 drivers/infiniband/core/cma.c:1695 ucma_close+0x110/0x310 drivers/infiniband/core/ucma.c:1753 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4144b1 RSP: 002b:00007ffc2d19a8e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 000000000000000a RCX: 00000000004144b1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009 RBP: 0000000000000001 R08: 00000000e1ded0b4 R09: 00000000e1ded0b8 R10: 00007ffc2d19a9c0 R11: 0000000000000293 R12: 000000000075bf20 R13: 000000000003472b R14: 0000000000763938 R15: 000000000075bf2c Allocated by task 9102: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x152/0x790 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] rdma_create_id+0x5a/0x4d0 drivers/infiniband/core/cma.c:790 ucma_create_id+0x19b/0x5b0 drivers/infiniband/core/ucma.c:484 ucma_write+0x231/0x310 drivers/infiniband/core/ucma.c:1672 __vfs_write+0x105/0x6b0 fs/read_write.c:480 vfs_write+0x198/0x500 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xfd/0x230 fs/read_write.c:582 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 9102: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 rdma_destroy_id+0x6fa/0xb70 drivers/infiniband/core/cma.c:1725 ucma_close+0x110/0x310 drivers/infiniband/core/ucma.c:1753 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888080f99200 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 480 bytes inside of 1024-byte region [ffff888080f99200, ffff888080f99600) The buggy address belongs to the page: page:ffffea000203e600 count:1 mapcount:0 mapping:ffff888080f98000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888080f98000 0000000000000000 0000000100000007 raw: ffffea00027d2ca0 ffffea00027b3da0 ffff8880aa800ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888080f99280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888080f99300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888080f99380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888080f99400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888080f99480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================