bisecting fixing commit since 4520f06b03ae667e442da1ab9351fd28cd7ac598 building syzkaller on 36b0b05078430cbedb73c32bed7f78056ce77536 testing commit 4520f06b03ae667e442da1ab9351fd28cd7ac598 with gcc (GCC) 8.1.0 kernel signature: 978dc92db83a5ca217d8201091925d65698f9f36e26340a703aa040d83cb7592 all runs: crashed: KASAN: use-after-free Read in cma_cancel_operation testing current HEAD b850307b279cbd12ab8c654d1a3dfe55319cc475 testing commit b850307b279cbd12ab8c654d1a3dfe55319cc475 with gcc (GCC) 8.1.0 kernel signature: 9e5aa52a7ba2b5067d69cf17782b7f5e38be3003efff6d6474813d959466c2a3 all runs: crashed: KASAN: use-after-free Read in cma_cancel_operation revisions tested: 2, total time: 37m26.078072586s (build: 16m40.354084391s, test: 20m16.211853824s) the crash still happens on HEAD commit msg: Linux 4.14.184 crash: KASAN: use-after-free Read in cma_cancel_operation bond0 (unregistering): Releasing backup interface bond_slave_1 bond0 (unregistering): Releasing backup interface bond_slave_0 bond0 (unregistering): Released all slaves ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xe7/0xf3 lib/list_debug.c:54 Read of size 8 at addr ffff88808abb6ae0 by task syz-executor270/20455 CPU: 1 PID: 20455 Comm: syz-executor270 Not tainted 4.14.184-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+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __list_del_entry_valid+0xe7/0xf3 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+0x300/0x9b0 drivers/infiniband/core/cma.c:1631 rdma_destroy_id+0x83/0xa70 drivers/infiniband/core/cma.c:1695 ucma_close+0x101/0x2e0 drivers/infiniband/core/ucma.c:1753 __fput+0x232/0x750 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x94b/0x2cc0 kernel/exit.c:858 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 SYSC_exit_group kernel/exit.c:966 [inline] SyS_exit_group+0x18/0x20 kernel/exit.c:964 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x445598 RSP: 002b:00007ffffa4afe78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445598 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004ccc90 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 00007ffffa4afed0 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006e0320 R14: 000000000000002d R15: 20c49ba5e353f7cf Allocated by task 20458: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x152/0x7a0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] rdma_create_id+0x58/0x4d0 drivers/infiniband/core/cma.c:790 ucma_create_id+0x191/0x550 drivers/infiniband/core/ucma.c:484 ucma_write+0x1f1/0x2c0 drivers/infiniband/core/ucma.c:1672 __vfs_write+0xdb/0x840 fs/read_write.c:480 vfs_write+0x150/0x4f0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0x100/0x250 fs/read_write.c:582 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 20455: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 rdma_destroy_id+0x619/0xa70 drivers/infiniband/core/cma.c:1725 ucma_close+0x101/0x2e0 drivers/infiniband/core/ucma.c:1753 __fput+0x232/0x750 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x94b/0x2cc0 kernel/exit.c:858 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 SYSC_exit_group kernel/exit.c:966 [inline] SyS_exit_group+0x18/0x20 kernel/exit.c:964 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88808abb6900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 480 bytes inside of 1024-byte region [ffff88808abb6900, ffff88808abb6d00) The buggy address belongs to the page: page:ffffea00022aed80 count:1 mapcount:0 mapping:ffff88808abb6000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88808abb6000 0000000000000000 0000000100000007 raw: ffffea0002a4b7a0 ffff8880aa801848 ffff8880aa800ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808abb6980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808abb6a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808abb6a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808abb6b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808abb6b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================