RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000100000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f59d41846d4 R13: 00000000004c9202 R14: 00000000004df800 R15: 0000000000000006 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:347 [inline] BUG: KASAN: use-after-free in memcpy_dir crypto/scatterwalk.c:28 [inline] BUG: KASAN: use-after-free in scatterwalk_copychunks+0x260/0x6b0 crypto/scatterwalk.c:43 Read of size 4096 at addr ffff888090be6000 by task syz-executor.0/10461 CPU: 1 PID: 10461 Comm: syz-executor.0 Not tainted 4.14.146 #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+0x138/0x197 lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc 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/0x2af mm/kasan/report.c:393 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:347 [inline] memcpy_dir crypto/scatterwalk.c:28 [inline] scatterwalk_copychunks+0x260/0x6b0 crypto/scatterwalk.c:43 scatterwalk_map_and_copy crypto/scatterwalk.c:72 [inline] scatterwalk_map_and_copy+0x12f/0x1d0 crypto/scatterwalk.c:60 gcmaes_encrypt.constprop.0+0x1d2/0xb90 arch/x86/crypto/aesni-intel_glue.c:778 generic_gcmaes_encrypt+0xf4/0x130 arch/x86/crypto/aesni-intel_glue.c:1111 crypto_aead_encrypt include/crypto/aead.h:330 [inline] gcmaes_wrapper_encrypt+0xef/0x150 arch/x86/crypto/aesni-intel_glue.c:945 crypto_aead_encrypt include/crypto/aead.h:330 [inline] tls_do_encryption net/tls/tls_sw.c:234 [inline] tls_push_record+0x906/0x1210 net/tls/tls_sw.c:270 tls_sw_sendpage+0x434/0xb50 net/tls/tls_sw.c:617 inet_sendpage+0x157/0x580 net/ipv4/af_inet.c:779 kernel_sendpage+0x92/0xf0 net/socket.c:3406 sock_sendpage+0x8b/0xc0 net/socket.c:871 pipe_to_sendpage+0x242/0x340 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x348/0x780 fs/splice.c:626 splice_from_pipe+0xf0/0x150 fs/splice.c:661 generic_splice_sendpage+0x3c/0x50 fs/splice.c:832 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0xd92/0x1430 fs/splice.c:1382 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a09 RSP: 002b:00007f59d4183c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f59d4183c90 RCX: 0000000000459a09 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000100000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f59d41846d4 R13: 00000000004c9202 R14: 00000000004df800 R15: 0000000000000006 Allocated by task 9557: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x7a0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sctp_bind_addrs_to_raw+0xf6/0x320 net/sctp/bind_addr.c:249 sctp_make_init_ack+0xb1/0x1230 net/sctp/sm_make_chunk.c:402 sctp_sf_do_5_1B_init+0x717/0xca0 net/sctp/sm_statefuns.c:423 sctp_do_sm+0xfb/0x4ae0 net/sctp/sm_sideeffect.c:1147 sctp_endpoint_bh_rcv+0x379/0x800 net/sctp/endpointola.c:456 sctp_inq_push+0x1c9/0x260 net/sctp/inqueue.c:95 sctp_rcv+0x232f/0x2e50 net/sctp/input.c:267 ip_local_deliver_finish+0x25e/0xad0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ip_local_deliver+0x1c3/0x4a0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:468 [inline] ip_rcv_finish+0x7be/0x1a50 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ip_rcv+0xaa5/0x112b net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1eae/0x2ca0 net/core/dev.c:4477 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4515 process_backlog+0x21f/0x730 net/core/dev.c:5197 napi_poll net/core/dev.c:5598 [inline] net_rx_action+0x490/0xf80 net/core/dev.c:5664 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 Freed by task 9557: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 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+0xcc/0x270 mm/slab.c:3815 sctp_make_init_ack+0xbfd/0x1230 net/sctp/sm_make_chunk.c:523 sctp_sf_do_5_1B_init+0x717/0xca0 net/sctp/sm_statefuns.c:423 sctp_do_sm+0xfb/0x4ae0 net/sctp/sm_sideeffect.c:1147 sctp_endpoint_bh_rcv+0x379/0x800 net/sctp/endpointola.c:456 sctp_inq_push+0x1c9/0x260 net/sctp/inqueue.c:95 sctp_rcv+0x232f/0x2e50 net/sctp/input.c:267 ip_local_deliver_finish+0x25e/0xad0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ip_local_deliver+0x1c3/0x4a0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:468 [inline] ip_rcv_finish+0x7be/0x1a50 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ip_rcv+0xaa5/0x112b net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1eae/0x2ca0 net/core/dev.c:4477 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4515 process_backlog+0x21f/0x730 net/core/dev.c:5197 napi_poll net/core/dev.c:5598 [inline] net_rx_action+0x490/0xf80 net/core/dev.c:5664 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 The buggy address belongs to the object at ffff888090be6000 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff888090be6000, ffff888090be6400) The buggy address belongs to the page: page:ffffea000242f980 count:1 mapcount:0 mapping:ffff888090be6000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff888090be6000 0000000000000000 0000000100000007 raw: ffffea0001db0ea0 ffffea00020f5ea0 ffff8880aa800ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888090be5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888090be5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888090be6000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888090be6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888090be6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================