================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:344 [inline] BUG: KASAN: slab-out-of-bounds in sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 Write of size 244 at addr ffff8801cc64b3bc by task /dev/autofs/12634 CPU: 0 PID: 12634 Comm: /dev/autofs Not tainted 4.15.0-rc7+ #163 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:344 [inline] sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 crypto_shash_update+0xda/0x240 crypto/shash.c:110 hmac_update+0x7e/0xa0 crypto/hmac.c:122 crypto_shash_update+0xda/0x240 crypto/shash.c:110 kdf_ctr security/keys/dh.c:181 [inline] keyctl_dh_compute_kdf security/keys/dh.c:226 [inline] __keyctl_dh_compute+0x160f/0x1990 security/keys/dh.c:398 compat_keyctl_dh_compute+0x2bb/0x3e0 security/keys/compat_dh.c:39 C_SYSC_keyctl security/keys/compat.c:136 [inline] compat_SyS_keyctl+0x72/0x2c0 security/keys/compat.c:59 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f85c79 RSP: 002b:00000000f778108c EFLAGS: 00000296 ORIG_RAX: 0000000000000120 RAX: ffffffffffffffda RBX: 0000000000000017 RCX: 00000000203b3000 RDX: 00000000207eb000 RSI: 0000000000000001 RDI: 00000000206e2fd4 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12634: 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:3708 [inline] __kmalloc+0x162/0x760 mm/slab.c:3717 kmalloc include/linux/slab.h:504 [inline] kdf_alloc security/keys/dh.c:111 [inline] __keyctl_dh_compute+0x2b0/0x1990 security/keys/dh.c:288 compat_keyctl_dh_compute+0x2bb/0x3e0 security/keys/compat_dh.c:39 C_SYSC_keyctl security/keys/compat.c:136 [inline] compat_SyS_keyctl+0x72/0x2c0 security/keys/compat.c:59 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 Freed by task 9304: 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:3488 [inline] kfree+0xd6/0x260 mm/slab.c:3803 skb_free_head+0x74/0xb0 net/core/skbuff.c:550 skb_release_data+0x58c/0x790 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0x153/0x490 net/core/skbuff.c:701 netlink_unicast_kernel net/netlink/af_netlink.c:1276 [inline] netlink_unicast+0x4f6/0x700 net/netlink/af_netlink.c:1301 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1864 sock_sendmsg_nosec net/socket.c:636 [inline] sock_sendmsg+0xca/0x110 net/socket.c:646 sock_write_iter+0x31a/0x5d0 net/socket.c:915 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 The buggy address belongs to the object at ffff8801cc64b2c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 252 bytes inside of 512-byte region [ffff8801cc64b2c0, ffff8801cc64b4c0) The buggy address belongs to the page: page:ffffea00073192c0 count:1 mapcount:0 mapping:ffff8801cc64b040 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cc64b040 0000000000000000 0000000100000006 raw: ffffea000731baa0 ffffea00072f1320 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cc64b300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cc64b380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cc64b400: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ^ ffff8801cc64b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cc64b500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================