================================================================== 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 1294 at addr ffff88809f803000 by task syz-executor.3/10042 CPU: 0 PID: 10042 Comm: syz-executor.3 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 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 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:0x459a29 RSP: 002b:00007f61fc704c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f61fc704c90 RCX: 0000000000459a29 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000a87 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f61fc7056d4 R13: 00000000004c9222 R14: 00000000004df820 R15: 0000000000000008 CPU: 1 PID: 10064 Comm: syz-executor.1 Not tainted 4.14.146 #0 Allocated by task 6978: Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 Call Trace: save_stack+0x45/0xd0 mm/kasan/kasan.c:447 __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x197 lib/dump_stack.c:53 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 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10f/0x159 lib/fault-inject.c:149 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 should_failslab+0xdb/0x130 mm/failslab.c:32 kmem_cache_alloc+0x12e/0x780 mm/slab.c:3552 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] kmem_cache_alloc+0x47/0x780 mm/slab.c:3550 kmem_cache_zalloc include/linux/slab.h:651 [inline] __kernfs_new_node+0x70/0x420 fs/kernfs/dir.c:633 kernfs_new_node+0x80/0xf0 fs/kernfs/dir.c:678 kernfs_create_dir_ns+0x41/0x140 fs/kernfs/dir.c:999 kernfs_create_dir include/linux/kernfs.h:501 [inline] internal_create_group+0xea/0x7b0 fs/sysfs/group.c:124 sysfs_create_group fs/sysfs/group.c:156 [inline] sysfs_create_groups fs/sysfs/group.c:183 [inline] sysfs_create_groups+0x97/0x140 fs/sysfs/group.c:173 skb_clone+0x129/0x320 net/core/skbuff.c:1282 device_add_groups drivers/base/core.c:1040 [inline] device_add_attrs drivers/base/core.c:1199 [inline] device_add+0x10b3/0x1490 drivers/base/core.c:1877 netdev_register_kobject+0x183/0x3a0 net/core/net-sysfs.c:1599 __netlink_deliver_tap_skb net/netlink/af_netlink.c:266 [inline] __netlink_deliver_tap net/netlink/af_netlink.c:291 [inline] netlink_deliver_tap+0x681/0x8f0 net/netlink/af_netlink.c:302 register_netdevice+0x814/0xca0 net/core/dev.c:7668 rtnl_newlink+0x1441/0x1700 net/core/rtnetlink.c:2711 rtnetlink_rcv_msg+0x3eb/0xb70 net/core/rtnetlink.c:4285 __netlink_sendskb+0x49/0xa0 net/netlink/af_netlink.c:1230 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 netlink_dump+0x774/0xb10 net/netlink/af_netlink.c:2228 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4297 netlink_recvmsg+0xaaa/0xdc0 net/netlink/af_netlink.c:1960 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x45d/0x640 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 sock_recvmsg_nosec+0x89/0xb0 net/socket.c:819 entry_SYSCALL_64_after_hwframe+0x42/0xb7 ___sys_recvmsg+0x21f/0x4d0 net/socket.c:2221 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88809f803000 which belongs to the cache kernfs_node_cache of size 160 The buggy address is located 0 bytes inside of 160-byte region [ffff88809f803000, ffff88809f8030a0) __sys_recvmmsg+0x226/0x6b0 net/socket.c:2329 The buggy address belongs to the page: page:ffffea00027e00c0 count:1 mapcount:0 mapping:ffff88809f803000 index:0xffff88809f803fee flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff88809f803000 ffff88809f803fee 0000000100000012 raw: ffffea0002544ee0 ffffea0001e0a5e0 ffff8880aa9e0840 0000000000000000 SYSC_recvmmsg net/socket.c:2405 [inline] SyS_recvmmsg+0x125/0x140 net/socket.c:2394 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f802f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 ffff88809f803000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809f803080: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 entry_SYSCALL_64_after_hwframe+0x42/0xb7 ^ RIP: 0033:0x459a29 ffff88809f803100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 RSP: 002b:00007f08efeb5c78 EFLAGS: 00000246 ffff88809f803180: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ORIG_RAX: 000000000000012b ================================================================== RAX: ffffffffffffffda RBX: 00007f08efeb5c90 RCX: 0000000000459a29 RDX: 0000000000000210 RSI: 0000000020000080 RDI: 0000000000000004