sd 0:0:1:0: [sg0] tag#527 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#527 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#527 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#527 CDB[20]: 03 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xd6/0xef lib/list_debug.c:54 Read of size 8 at addr ffff888094d76fa0 by task syz-executor.2/21018 CPU: 1 PID: 21018 Comm: syz-executor.2 Not tainted 4.14.180-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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 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/0x2ae mm/kasan/report.c:393 __list_del_entry_valid+0xd6/0xef 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+0x280/0x940 drivers/infiniband/core/cma.c:1619 rdma_destroy_id+0x8b/0xb50 drivers/infiniband/core/cma.c:1695 ucma_close+0x105/0x300 drivers/infiniband/core/ucma.c:1753 __fput+0x25f/0x790 fs/file_table.c:210 task_work_run+0x113/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1d6/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+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x416421 RSP: 002b:00007ffdb2e765d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000416421 RDX: 0000000000000000 RSI: 0000000000001bb6 RDI: 0000000000000005 RBP: 0000000000000001 R08: 00000000f6c41bb6 R09: 00000000f6c41bba R10: 00007ffdb2e766c0 R11: 0000000000000293 R12: 0000000000791b28 R13: 00000000000e0931 R14: ffffffffffffffff R15: 000000000078bf0c Allocated by task 21020: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] rdma_create_id+0x57/0x4c0 drivers/infiniband/core/cma.c:790 ucma_create_id+0x18b/0x500 drivers/infiniband/core/ucma.c:484 ucma_write+0x206/0x2c0 drivers/infiniband/core/ucma.c:1672 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x192/0x4e0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 21018: save_stack+0x32/0xa0 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+0xcb/0x260 mm/slab.c:3815 ucma_close+0x105/0x300 drivers/infiniband/core/ucma.c:1753 __fput+0x25f/0x790 fs/file_table.c:210 task_work_run+0x113/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1d6/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+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888094d76dc0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 480 bytes inside of 1024-byte region [ffff888094d76dc0, ffff888094d771c0) The buggy address belongs to the page: page:ffffea0002535d80 count:1 mapcount:0 mapping:ffff888094d76040 index:0xffff888094d76040 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888094d76040 ffff888094d76040 0000000100000005 raw: ffffea00024533a0 ffffea00025112a0 ffff88812fe54ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888094d76e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888094d76f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888094d76f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888094d77000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888094d77080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== sd 0:0:1:0: [sg0] tag#517 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#517 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#517 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#517 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#517 CDB[20]: 03 sd 0:0:1:0: [sg0] tag#517 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#517 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#517 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#517 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#517 CDB[20]: 03 sd 0:0:1:0: [sg0] tag#527 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#527 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#527 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#527 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#527 CDB[20]: 03 sd 0:0:1:0: [sg0] tag#517 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#517 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#517 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#517 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#517 CDB[20]: 03 sd 0:0:1:0: [sg0] tag#517 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#517 CDB: opcode=0xd5 (vendor) sd 0:0:1:0: [sg0] tag#517 CDB[00]: d5 c6 10 21 ef 22 d8 ac 0a 40 96 02 88 22 36 a6 sd 0:0:1:0: [sg0] tag#517 CDB[10]: 04 7d f9 53 93 30 8f 9d 7c 84 3a 1a 62 9a df 82 sd 0:0:1:0: [sg0] tag#517 CDB[20]: 03