================================================================== BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:345 [inline] BUG: KASAN: null-ptr-deref in rdma_resolve_addr+0x12e/0x26c0 drivers/infiniband/core/cma.c:2920 Write of size 28 at addr 00000000000000a0 by task syz-executor1/13265 CPU: 1 PID: 13265 Comm: syz-executor1 Not tainted 4.16.0-rc5+ #357 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 kasan_report_error mm/kasan/report.c:352 [inline] kasan_report+0x140/0x360 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x137/0x190 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:345 [inline] rdma_resolve_addr+0x12e/0x26c0 drivers/infiniband/core/cma.c:2920 ucma_resolve_ip+0x142/0x1f0 drivers/infiniband/core/ucma.c:677 ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1633 __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:0x453e69 RSP: 002b:00007f8a16d73c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f8a16d746d4 RCX: 0000000000453e69 RDX: 0000000000000048 RSI: 0000000020000180 RDI: 0000000000000016 RBP: 000000000072bf58 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000672 R14: 00000000006f9b50 R15: 0000000000000001 ================================================================== Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 13265 Comm: syz-executor1 Tainted: G B 4.16.0-rc5+ #357 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 binder_alloc: binder_alloc_mmap_handler: 13292 20000000-20002000 already mapped failed -16 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 panic+0x1e4/0x41c kernel/panic.c:183 binder: BINDER_SET_CONTEXT_MGR already set kasan_end_report+0x50/0x50 mm/kasan/report.c:180 kasan_report_error mm/kasan/report.c:359 [inline] kasan_report+0x149/0x360 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x137/0x190 mm/kasan/kasan.c:267 binder: 13292:13295 ioctl 40046207 0 returned -16 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:345 [inline] rdma_resolve_addr+0x12e/0x26c0 drivers/infiniband/core/cma.c:2920 binder: 13292:13294 got new transaction with bad transaction stack, transaction 36 has target 13292:0 binder: 13292:13294 transaction failed 29201/-71, size 40-0 line 2875 binder: release 13292:13294 transaction 36 out, still active ucma_resolve_ip+0x142/0x1f0 drivers/infiniband/core/ucma.c:677 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1633 binder: send failed reply for transaction 36, target dead __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:0x453e69 RSP: 002b:00007f8a16d73c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f8a16d746d4 RCX: 0000000000453e69 RDX: 0000000000000048 RSI: 0000000020000180 RDI: 0000000000000016 RBP: 000000000072bf58 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000672 R14: 00000000006f9b50 R15: 0000000000000001 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds..