RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 000000011d100000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0116a866d4 R13: 00000000004c9478 R14: 00000000004dfdd8 R15: 0000000000000006 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:348 [inline] BUG: KASAN: use-after-free in memcpy_dir crypto/scatterwalk.c:28 [inline] BUG: KASAN: use-after-free in scatterwalk_copychunks+0x269/0x6a0 crypto/scatterwalk.c:43 Read of size 4096 at addr ffff8880a9572000 by task syz-executor.4/11494 CPU: 0 PID: 11494 Comm: syz-executor.4 Not tainted 4.19.76 #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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x123/0x190 mm/kasan/kasan.c:267 memcpy+0x24/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] memcpy_dir crypto/scatterwalk.c:28 [inline] scatterwalk_copychunks+0x269/0x6a0 crypto/scatterwalk.c:43 scatterwalk_map_and_copy crypto/scatterwalk.c:72 [inline] scatterwalk_map_and_copy+0x14d/0x1d0 crypto/scatterwalk.c:60 gcmaes_encrypt.constprop.0+0x762/0xd90 arch/x86/crypto/aesni-intel_glue.c:956 generic_gcmaes_encrypt+0x108/0x160 arch/x86/crypto/aesni-intel_glue.c:1297 crypto_aead_encrypt include/crypto/aead.h:335 [inline] gcmaes_wrapper_encrypt+0x15f/0x200 arch/x86/crypto/aesni-intel_glue.c:1130 crypto_aead_encrypt include/crypto/aead.h:335 [inline] tls_do_encryption net/tls/tls_sw.c:193 [inline] tls_push_record+0x9c0/0x13a0 net/tls/tls_sw.c:228 tls_sw_sendpage+0x538/0xd50 net/tls/tls_sw.c:585 inet_sendpage+0x168/0x630 net/ipv4/af_inet.c:815 kernel_sendpage+0x92/0xf0 net/socket.c:3377 sock_sendpage+0x8b/0xc0 net/socket.c:847 pipe_to_sendpage+0x296/0x360 fs/splice.c:452 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x391/0x7d0 fs/splice.c:627 splice_from_pipe+0x108/0x170 fs/splice.c:662 generic_splice_sendpage+0x3c/0x50 fs/splice.c:833 do_splice_from fs/splice.c:852 [inline] do_splice+0x642/0x12c0 fs/splice.c:1148 __do_sys_splice fs/splice.c:1415 [inline] __se_sys_splice fs/splice.c:1395 [inline] __x64_sys_splice+0x2c6/0x330 fs/splice.c:1395 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a29 Code: fd 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fbd89549c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007fbd89549c90 RCX: 0000000000459a29 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 000000011d100000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbd8954a6d4 R13: 00000000004c9478 R14: 00000000004dfdd8 R15: 0000000000000005 The buggy address belongs to the page: page:ffffea0002a55c80 count:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0x1fffc0000000000() raw: 01fffc0000000000 ffffea00023c4888 ffffea00027cca08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9571f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a9571f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a9572000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880a9572080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880a9572100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================