================================================================== BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:348 [inline] BUG: KASAN: null-ptr-deref in llcp_sock_getname+0x347/0x440 net/nfc/llcp_sock.c:531 Read of size 43 at addr 0000000000000000 by task syz-executor.3/27339 CPU: 1 PID: 27339 Comm: syz-executor.3 Not tainted 4.19.125-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+0x1fc/0x2fe lib/dump_stack.c:118 kasan_report_error mm/kasan/report.c:352 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x194/0x2b9 mm/kasan/report.c:396 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] llcp_sock_getname+0x347/0x440 net/nfc/llcp_sock.c:531 __sys_getpeername+0x10b/0x250 net/socket.c:1735 __do_sys_getpeername net/socket.c:1748 [inline] __se_sys_getpeername net/socket.c:1745 [inline] __x64_sys_getpeername+0x6f/0xb0 net/socket.c:1745 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ca69 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007efcebc6bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000034 RAX: ffffffffffffffda RBX: 00000000004dcc80 RCX: 000000000045ca69 RDX: 0000000020000100 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f8 R14: 00000000004c39e9 R15: 00007efcebc6c6d4 ================================================================== BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 1f799a067 P4D 1f799a067 PUD 1f75c6067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 27377 Comm: syz-executor.3 Tainted: G B 4.19.125-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:55 Code: eb 88 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe RSP: 0018:ffff8881f406fda0 EFLAGS: 00010246 RAX: ffff8881f406fe22 RBX: ffff8881f406fe10 RCX: 000000000000002b RDX: 000000000000002b RSI: 0000000000000000 RDI: ffff8881f406fe22 RBP: ffff8880563c65c0 R08: ffff88820162e4c0 R09: ffffed103e80dfca R10: ffffed103e80dfc9 R11: ffff8881f406fe4c R12: 0000000000000060 R13: 0000000020000080 R14: 0000000020000100 R15: ffff8881f406fe10 FS: 00007efcebc2a700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001f7999000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: memcpy include/linux/string.h:348 [inline] llcp_sock_getname+0x347/0x440 net/nfc/llcp_sock.c:531 __sys_getpeername+0x10b/0x250 net/socket.c:1735 __do_sys_getpeername net/socket.c:1748 [inline] __se_sys_getpeername net/socket.c:1745 [inline] __x64_sys_getpeername+0x6f/0xb0 net/socket.c:1745 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ca69 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007efcebc29c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000034 RAX: ffffffffffffffda RBX: 00000000004dcc80 RCX: 000000000045ca69 RDX: 0000000020000100 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 000000000078c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f8 R14: 00000000004c39e9 R15: 00007efcebc2a6d4 Modules linked in: CR2: 0000000000000000