================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x93/0xa0 lib/list_debug.c:26 Read of size 8 at addr ffff88809dd8a1e0 by task syz-executor.0/7378 CPU: 1 PID: 7378 Comm: syz-executor.0 Not tainted 5.6.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374 __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 __list_add_valid+0x93/0xa0 lib/list_debug.c:26 __list_add include/linux/list.h:67 [inline] list_add_tail include/linux/list.h:100 [inline] cma_listen_on_all drivers/infiniband/core/cma.c:2512 [inline] rdma_listen+0x681/0x910 drivers/infiniband/core/cma.c:3629 ucma_listen+0x14d/0x1c0 drivers/infiniband/core/ucma.c:1092 ucma_write+0x285/0x350 drivers/infiniband/core/ucma.c:1684 __vfs_write+0x76/0x100 fs/read_write.c:494 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x1e8/0x250 fs/read_write.c:611 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe8f arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Allocated by task 7373: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] __rdma_create_id+0x5b/0x850 drivers/infiniband/core/cma.c:856 ucma_create_id+0x1cb/0x580 drivers/infiniband/core/ucma.c:501 ucma_write+0x285/0x350 drivers/infiniband/core/ucma.c:1684 __vfs_write+0x76/0x100 fs/read_write.c:494 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x1e8/0x250 fs/read_write.c:611 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe8f arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 7373: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:476 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 ucma_close+0x10b/0x300 drivers/infiniband/core/ucma.c:1762 __fput+0x2da/0x850 fs/file_table.c:280 task_work_run+0x13f/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x2fa/0x360 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:352 [inline] do_fast_syscall_32+0xbef/0xe8f arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff88809dd8a000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 480 bytes inside of 2048-byte region [ffff88809dd8a000, ffff88809dd8a800) The buggy address belongs to the page: page:ffffea0002776280 refcount:1 mapcount:0 mapping:ffff8880aa000e00 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000244b5c8 ffffea000268c9c8 ffff8880aa000e00 raw: 0000000000000000 ffff88809dd8a000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809dd8a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809dd8a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809dd8a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809dd8a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809dd8a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================