================================================================== BUG: KASAN: use-after-free in __list_add_valid+0xc6/0xd0 lib/list_debug.c:26 Read of size 8 at addr ffff8801c57cbcd8 by task syz-executor1/23474 CPU: 1 PID: 23474 Comm: syz-executor1 Not tainted 4.16.0-rc6+ #362 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+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __list_add_valid+0xc6/0xd0 lib/list_debug.c:26 __list_add include/linux/list.h:60 [inline] list_add_tail include/linux/list.h:93 [inline] cma_listen_on_all drivers/infiniband/core/cma.c:2309 [inline] rdma_listen+0x581/0x8e0 drivers/infiniband/core/cma.c:3333 ucma_listen+0x172/0x1f0 drivers/infiniband/core/ucma.c:1074 ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1649 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x454239 RSP: 002b:00007f72c4993c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f72c49946d4 RCX: 0000000000454239 RDX: 0000000000000010 RSI: 0000000020000080 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000676 R14: 00000000006fabb0 R15: 0000000000000000 Allocated by task 3949: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3607 kmalloc include/linux/slab.h:512 [inline] syslog_print kernel/printk/printk.c:1296 [inline] do_syslog+0x5d7/0xb80 kernel/printk/printk.c:1459 kmsg_read+0x74/0xa0 fs/proc/kmsg.c:40 proc_reg_read+0xe8/0x160 fs/proc/inode.c:218 __vfs_read+0xef/0xa00 fs/read_write.c:411 vfs_read+0x11e/0x350 fs/read_write.c:447 SYSC_read fs/read_write.c:573 [inline] SyS_read+0xef/0x220 fs/read_write.c:566 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 3949: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 syslog_print kernel/printk/printk.c:1347 [inline] do_syslog+0x8b5/0xb80 kernel/printk/printk.c:1459 kmsg_read+0x74/0xa0 fs/proc/kmsg.c:40 proc_reg_read+0xe8/0x160 fs/proc/inode.c:218 __vfs_read+0xef/0xa00 fs/read_write.c:411 vfs_read+0x11e/0x350 fs/read_write.c:447 SYSC_read fs/read_write.c:573 [inline] SyS_read+0xef/0x220 fs/read_write.c:566 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801c57cbb00 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 472 bytes inside of 1024-byte region [ffff8801c57cbb00, ffff8801c57cbf00) The buggy address belongs to the page: page:ffffea000715f280 count:1 mapcount:0 mapping:ffff8801c57ca000 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801c57ca000 0000000000000000 0000000100000007 raw: ffffea0006e72920 ffffea00076441a0 ffff8801dac00ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c57cbb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c57cbc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c57cbc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c57cbd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c57cbd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================