R10: 0000000020001fde R11: 0000000000000212 R12: 00000000006f3ef8 R13: 00000000ffffffff R14: 00007f4ce2e186d4 R15: 000000000000000c netlink: 17 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 17 bytes leftover after parsing attributes in process `syz-executor1'. ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:341 [inline] BUG: KASAN: slab-out-of-bounds in sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 Write of size 137 at addr ffff8801cdc0f178 by task syz-executor0/5954 CPU: 1 PID: 5954 Comm: syz-executor0 Not tainted 4.15.0-rc2+ #141 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x137/0x190 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:341 [inline] sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 crypto_shash_update+0xcb/0x220 crypto/shash.c:109 hmac_update+0x7e/0xa0 crypto/hmac.c:122 crypto_shash_update+0xcb/0x220 crypto/shash.c:109 hmac_update+0x7e/0xa0 crypto/hmac.c:122 crypto_shash_update+0xcb/0x220 crypto/shash.c:109 shash_ahash_update+0xbe/0x120 crypto/shash.c:228 shash_async_update+0x19/0x20 crypto/shash.c:236 crypto_ahash_update include/crypto/hash.h:522 [inline] hash_sendmsg+0x49a/0x9c0 crypto/algif_hash.c:112 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 ___sys_sendmsg+0x75b/0x8a0 net/socket.c:2048 __sys_sendmsg+0xe5/0x210 net/socket.c:2082 SYSC_sendmsg net/socket.c:2093 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2089 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x4529d9 RSP: 002b:00007f133b942c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000758190 RCX: 00000000004529d9 RDX: 0000000000040003 RSI: 000000002034cfc8 RDI: 0000000000000017 RBP: 000000000000039b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2728 R13: 00000000ffffffff R14: 00007f133b9436d4 R15: 0000000000000008 Allocated by task 5941: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3711 [inline] __kmalloc+0x162/0x760 mm/slab.c:3720 kmalloc include/linux/slab.h:504 [inline] sock_kmalloc+0x112/0x190 net/core/sock.c:1979 hash_accept_parent_nokey+0x76/0x320 crypto/algif_hash.c:470 hash_accept_parent+0x9a/0xd0 crypto/algif_hash.c:497 af_alg_accept+0x125/0x670 crypto/af_alg.c:294 alg_accept+0x46/0x60 crypto/af_alg.c:330 SYSC_accept4+0x384/0x850 net/socket.c:1573 SyS_accept4 net/socket.c:1523 [inline] SYSC_accept net/socket.c:1607 [inline] SyS_accept+0x26/0x30 net/socket.c:1604 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 3492: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3491 [inline] kfree+0xca/0x250 mm/slab.c:3806 sk_prot_free net/core/sock.c:1506 [inline] __sk_destruct+0x74a/0x910 net/core/sock.c:1585 sk_destruct+0x47/0x80 net/core/sock.c:1593 __sk_free+0x57/0x230 net/core/sock.c:1601 sk_free+0x2a/0x40 net/core/sock.c:1612 sock_put include/net/sock.h:1655 [inline] af_alg_release+0x5d/0x70 crypto/af_alg.c:126 sock_release+0x8d/0x1e0 net/socket.c:596 sock_close+0x16/0x20 net/socket.c:1125 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ae0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801cdc0ec40 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1336 bytes inside of 2048-byte region [ffff8801cdc0ec40, ffff8801cdc0f440) The buggy address belongs to the page: page:00000000b5ebb744 count:1 mapcount:0 mapping:00000000f6dc9167 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801cdc0e3c0 0000000000000000 0000000100000003 raw: ffffea00070ec320 ffffea000732d020 ffff8801db000c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cdc0f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cdc0f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cdc0f180: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801cdc0f200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cdc0f280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================