RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000100000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff48409e6d4 R13: 00000000004c90ca R14: 00000000004df570 R15: 0000000000000006 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:347 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_dir crypto/scatterwalk.c:28 [inline] BUG: KASAN: slab-out-of-bounds in scatterwalk_copychunks+0x260/0x6b0 crypto/scatterwalk.c:43 Read of size 4096 at addr ffff88808a120000 by task syz-executor.1/14489 CPU: 0 PID: 14489 Comm: syz-executor.1 Not tainted 4.14.143 #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 kasan: CONFIG_KASAN_INLINE enabled 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 kasan: GPF could be caused by NULL-ptr deref or user memory access 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:0x4598e9 RSP: 002b:00007ff706847c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007ff706847c90 RCX: 00000000004598e9 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000100000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff7068486d4 R13: 00000000004c90ca R14: 00000000004df570 R15: 0000000000000006 Allocated by task 6783: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 general protection fault: 0000 [#1] PREEMPT SMP KASAN 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 Modules linked in: kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x780 mm/slab.c:3552 CPU: 1 PID: 14497 Comm: syz-executor.3 Not tainted 4.14.143 #0 getname_flags fs/namei.c:138 [inline] getname_flags+0xcb/0x580 fs/namei.c:128 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 user_path_at_empty+0x2f/0x50 fs/namei.c:2630 task: ffff8880580f2040 task.stack: ffff88805ba68000 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xcd/0x160 fs/stat.c:185 RIP: 0010:scatterwalk_start include/crypto/scatterwalk.h:86 [inline] RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:111 [inline] RIP: 0010:scatterwalk_pagedone include/crypto/scatterwalk.h:95 [inline] RIP: 0010:scatterwalk_copychunks+0x4d6/0x6b0 crypto/scatterwalk.c:55 vfs_lstat include/linux/fs.h:3065 [inline] SYSC_newlstat+0x95/0x100 fs/stat.c:350 RSP: 0018:ffff88805ba6f648 EFLAGS: 00010202 SyS_newlstat+0x1e/0x30 fs/stat.c:344 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 RAX: dffffc0000000000 RBX: 000000000000401d RCX: ffffc9000a277000 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RDX: 0000000000000002 RSI: ffffffff82d55c09 RDI: ffff88805ce3c3d8 Freed by task 6783: RBP: ffff88805ba6f6b8 R08: 1ffff1100b2c6800 R09: ffffed100b2c6804 R10: ffffed100b2c6803 R11: ffff88805963401c R12: 000000000000401d save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 R13: 0000000000000000 R14: ffff88805ba6f710 R15: 0000000000001000 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 FS: 00007ff48409e700(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x83/0x2b0 mm/slab.c:3758 CR2: 00007ffd32336638 CR3: 0000000093c05000 CR4: 00000000001406e0 putname+0xdb/0x120 fs/namei.c:259 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 filename_lookup+0x23a/0x380 fs/namei.c:2385 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 user_path_at_empty+0x43/0x50 fs/namei.c:2630 Call Trace: user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xcd/0x160 fs/stat.c:185 scatterwalk_map_and_copy crypto/scatterwalk.c:72 [inline] scatterwalk_map_and_copy+0x12f/0x1d0 crypto/scatterwalk.c:60 vfs_lstat include/linux/fs.h:3065 [inline] SYSC_newlstat+0x95/0x100 fs/stat.c:350 SyS_newlstat+0x1e/0x30 fs/stat.c:344 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 gcmaes_encrypt.constprop.0+0x2e9/0xb90 arch/x86/crypto/aesni-intel_glue.c:802 The buggy address belongs to the object at ffff88808a120500 which belongs to the cache names_cache of size 4096 The buggy address is located 1280 bytes to the left of 4096-byte region [ffff88808a120500, ffff88808a121500) generic_gcmaes_encrypt+0xf4/0x130 arch/x86/crypto/aesni-intel_glue.c:1111 The buggy address belongs to the page: page:ffffea0002284800 count:1 mapcount:0 mapping:ffff88808a120500 index:0x0 crypto_aead_encrypt include/crypto/aead.h:330 [inline] gcmaes_wrapper_encrypt+0xef/0x150 arch/x86/crypto/aesni-intel_glue.c:945 compound_mapcount: 0 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 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff88808a120500 0000000000000000 0000000100000001 raw: ffffea0002457ea0 ffffea000242d3a0 ffff8880aa9e0cc0 0000000000000000 page dumped because: kasan: bad access detected inet_sendpage+0x157/0x580 net/ipv4/af_inet.c:779 Memory state around the buggy address: kernel_sendpage+0x92/0xf0 net/socket.c:3406 ffff88808a11ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808a11ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sock_sendpage+0x8b/0xc0 net/socket.c:871 >ffff88808a120000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ pipe_to_sendpage+0x242/0x340 fs/splice.c:451 ffff88808a120080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808a120100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x348/0x780 fs/splice.c:626