================================================================== 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 214 at addr ffff8801c6b090fc by task syz-executor1/21574 CPU: 1 PID: 21574 Comm: syz-executor1 Not tainted 4.15.0-rc5+ #237 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 keyctl_dh_compute+0xac/0xf3 security/keys/dh.c:434 SYSC_keyctl security/keys/keyctl.c:1741 [inline] SyS_keyctl+0x72/0x2c0 security/keys/keyctl.c:1637 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452ac9 RSP: 002b:00007f63392e3c58 EFLAGS: 00000212 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffda RBX: 00007f63392e4700 RCX: 0000000000452ac9 RDX: 00000000205cd000 RSI: 00000000204c8ff4 RDI: 0000000000000017 RBP: 0000000000000000 R08: 0000000020550000 R09: 0000000000000000 R10: 0000000000000030 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f7ef R14: 00007f63392e49c0 R15: 0000000000000000 Allocated by task 21574: 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 keyctl_dh_compute+0xac/0xf3 security/keys/dh.c:434 SYSC_keyctl security/keys/keyctl.c:1741 [inline] SyS_keyctl+0x72/0x2c0 security/keys/keyctl.c:1637 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 18428: 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_broadcast_filtered+0x5d0/0x1360 net/netlink/af_netlink.c:1477 netlink_broadcast net/netlink/af_netlink.c:1499 [inline] nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x91/0x150 net/netlink/af_netlink.c:2451 rtnl_notify+0xbb/0xe0 net/core/rtnetlink.c:649 rtmsg_ifa+0x178/0x1c0 net/ipv4/devinet.c:1715 __inet_del_ifa+0x4a9/0xb00 net/ipv4/devinet.c:408 inet_del_ifa net/ipv4/devinet.c:439 [inline] inetdev_destroy net/ipv4/devinet.c:304 [inline] inetdev_event+0x940/0x1240 net/ipv4/devinet.c:1529 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x60 net/core/dev.c:1679 call_netdevice_notifiers net/core/dev.c:1697 [inline] rollback_registered_many+0x8ad/0xdf0 net/core/dev.c:7243 rollback_registered+0x1be/0x3c0 net/core/dev.c:7285 unregister_netdevice_queue+0x2e3/0x5d0 net/core/dev.c:8273 unregister_netdevice include/linux/netdevice.h:2462 [inline] __tun_detach+0x1177/0x1550 drivers/net/tun.c:658 tun_detach drivers/net/tun.c:669 [inline] tun_chr_close+0x44/0x60 drivers/net/tun.c:2861 __fput+0x327/0x7e0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x296/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x94/0x96 The buggy address belongs to the object at ffff8801c6b09000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 252 bytes inside of 512-byte region [ffff8801c6b09000, ffff8801c6b09200) The buggy address belongs to the page: page:000000000a2412b7 count:1 mapcount:0 mapping:0000000069bf85b7 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801c6b09000 0000000000000000 0000000100000006 raw: ffffea00071b9ee0 ffffea00071ba520 ffff8801db000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c6b09080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c6b09100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801c6b09180: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c6b09200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c6b09280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================