================================================================== 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 206 at addr ffff8801cfbcd3bc by task syz-executor6/23889 CPU: 0 PID: 23889 Comm: syz-executor6 Not tainted 4.15.0-rc4-mm1+ #49 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:256 kasan_report_error mm/kasan/report.c:355 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:413 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:00007faa48c8fc58 EFLAGS: 00000212 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ac9 RDX: 00000000205cd000 RSI: 00000000204c8ff4 RDI: 0000000000000017 RBP: 0000000000000260 R08: 0000000020457fc8 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000212 R12: 00000000006f09a0 R13: 00000000ffffffff R14: 00007faa48c906d4 R15: 0000000000000000 Allocated by task 23889: 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:3705 [inline] __kmalloc+0x162/0x760 mm/slab.c:3714 kmalloc include/linux/slab.h:521 [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 20762: 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:3485 [inline] kfree+0xd6/0x260 mm/slab.c:3800 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] kfree_skb+0x15d/0x4c0 net/core/skbuff.c:659 sctp_ulpevent_free+0x332/0x4a0 net/sctp/ulpevent.c:1132 sctp_ulpq_tail_event+0x5d9/0xc40 net/sctp/ulpqueue.c:286 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1478 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1210 [inline] sctp_do_sm+0x12f3/0x6ed0 net/sctp/sm_sideeffect.c:1181 sctp_assoc_bh_rcv+0x283/0x4b0 net/sctp/associola.c:1065 sctp_inq_push+0x23b/0x300 net/sctp/inqueue.c:95 sctp_backlog_rcv+0x177/0xa90 net/sctp/input.c:350 sk_backlog_rcv include/net/sock.h:907 [inline] __release_sock+0x124/0x360 net/core/sock.c:2274 release_sock+0xa4/0x2a0 net/core/sock.c:2789 sctp_wait_for_connect+0x346/0x570 net/sctp/socket.c:8258 __sctp_connect+0xa90/0xca0 net/sctp/socket.c:1274 __sctp_setsockopt_connectx+0x1ae/0x1f0 net/sctp/socket.c:1387 sctp_getsockopt_connectx3 net/sctp/socket.c:1472 [inline] sctp_getsockopt+0x4118/0x7328 net/sctp/socket.c:7157 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2937 SYSC_getsockopt net/socket.c:1852 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1834 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801cfbcd2c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 252 bytes inside of 512-byte region [ffff8801cfbcd2c0, ffff8801cfbcd4c0) The buggy address belongs to the page: page:ffffea00073ef340 count:1 mapcount:0 mapping:ffff8801cfbcd040 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cfbcd040 0000000000000000 0000000100000006 raw: ffffea00073ef420 ffffea00072f30e0 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cfbcd300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cfbcd380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cfbcd400: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ^ ffff8801cfbcd480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cfbcd500: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================