IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x93/0xa0 lib/list_debug.c:26 Read of size 8 at addr ffff8880876713d8 by task syz-executor.0/6611 CPU: 1 PID: 6611 Comm: syz-executor.0 Not tainted 4.14.176-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_add_valid+0x93/0xa0 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:2321 [inline] rdma_listen+0x580/0x800 drivers/infiniband/core/cma.c:3320 ucma_listen+0x10b/0x160 drivers/infiniband/core/ucma.c:1078 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 RIP: 0033:0x45c829 RSP: 002b:00007f25baafcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000050bb40 RCX: 000000000045c829 RDX: 0000000000000010 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000cc2 R14: 00000000004ceed4 R15: 00007f25baafd6d4 Allocated by task 6604: 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 6604: 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 get_signal+0x187f/0x1ca0 kernel/signal.c:2234 do_signal+0x7c/0x1690 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x159/0x220 arch/x86/entry/common.c:160 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 ffff888087671200 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 472 bytes inside of 1024-byte region [ffff888087671200, ffff888087671600) The buggy address belongs to the page: page:ffffea00021d9c00 count:1 mapcount:0 mapping:ffff888087670000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888087670000 0000000000000000 0000000100000007 raw: ffffea0002430420 ffffea0002230220 ffff88812fe56ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888087671280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087671300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888087671380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888087671400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087671480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================