================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x93/0xa0 syzkaller/managers/linux-4-14/kernel/lib/list_debug.c:26 Read of size 8 at addr ffff8880b2945898 by task syz-executor164/8161 CPU: 1 PID: 8161 Comm: syz-executor164 Not tainted 4.14.218-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:351 kasan_report syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:430 __list_add_valid+0x93/0xa0 syzkaller/managers/linux-4-14/kernel/lib/list_debug.c:26 __list_add syzkaller/managers/linux-4-14/kernel/./include/linux/list.h:60 [inline] list_add_tail syzkaller/managers/linux-4-14/kernel/./include/linux/list.h:93 [inline] cma_listen_on_all syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/cma.c:2327 [inline] rdma_listen+0x656/0x9b0 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/cma.c:3338 ucma_listen+0x10b/0x170 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/ucma.c:1078 ucma_write+0x206/0x2c0 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/ucma.c:1672 __vfs_write+0xe4/0x630 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:480 vfs_write+0x17f/0x4d0 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:544 SYSC_write syzkaller/managers/linux-4-14/kernel/fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:582 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x43fd39 RSP: 002b:00007ffcad55a078 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000072a9 RCX: 000000000043fd39 RDX: 0000000000000010 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffcad55a218 R09: 00007ffcad55a218 R10: 00007ffcad55a218 R11: 0000000000000246 R12: 00007ffcad55a08c R13: 431bde82d7b634db R14: 00000000004ae018 R15: 0000000000400488 Allocated by task 8095: save_stack syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:447 [inline] set_track syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3618 kmalloc syzkaller/managers/linux-4-14/kernel/./include/linux/slab.h:488 [inline] kzalloc syzkaller/managers/linux-4-14/kernel/./include/linux/slab.h:661 [inline] rdma_create_id+0x57/0x4c0 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/cma.c:790 ucma_create_id+0x18b/0x500 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/ucma.c:484 ucma_write+0x206/0x2c0 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/ucma.c:1672 __vfs_write+0xe4/0x630 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:480 vfs_write+0x17f/0x4d0 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:544 SYSC_write syzkaller/managers/linux-4-14/kernel/fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 syzkaller/managers/linux-4-14/kernel/fs/read_write.c:582 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8095: save_stack syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:447 [inline] set_track syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:524 __cache_free syzkaller/managers/linux-4-14/kernel/mm/slab.c:3496 [inline] kfree+0xc9/0x250 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3815 ucma_close+0x11a/0x340 syzkaller/managers/linux-4-14/kernel/drivers/infiniband/core/ucma.c:1753 __fput+0x25f/0x7a0 syzkaller/managers/linux-4-14/kernel/fs/file_table.c:210 task_work_run+0x11f/0x190 syzkaller/managers/linux-4-14/kernel/kernel/task_work.c:113 exit_task_work syzkaller/managers/linux-4-14/kernel/./include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 syzkaller/managers/linux-4-14/kernel/kernel/exit.c:868 do_group_exit+0x100/0x2e0 syzkaller/managers/linux-4-14/kernel/kernel/exit.c:965 SYSC_exit_group syzkaller/managers/linux-4-14/kernel/kernel/exit.c:976 [inline] SyS_exit_group+0x19/0x20 syzkaller/managers/linux-4-14/kernel/kernel/exit.c:974 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880b29456c0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 472 bytes inside of 1024-byte region [ffff8880b29456c0, ffff8880b2945ac0) The buggy address belongs to the page: page:ffffea0002ca5100 count:1 mapcount:0 mapping:ffff8880b2944040 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b2944040 0000000000000000 0000000100000007 raw: ffffea000255f420 ffffea0002c40420 ffff88813fe80ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b2945780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b2945800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b2945880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b2945900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b2945980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================