================================================================== BUG: KASAN: slab-out-of-bounds in pfkey_msg2xfrm_state net/key/af_key.c:1219 [inline] at addr ffff8801ccb41198 BUG: KASAN: slab-out-of-bounds in pfkey_add+0x153e/0x3470 net/key/af_key.c:1498 at addr ffff8801ccb41198 Read of size 8192 by task syzkaller504987/3316 CPU: 0 PID: 3316 Comm: syzkaller504987 Not tainted 4.9.69-g3f1d77c #108 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801cd81f748 ffffffff81d90a29 ffff8801da001280 ffff8801ccb41180 ffff8801ccb41380 ffffed0039968270 ffff8801ccb41198 ffff8801cd81f770 ffffffff8153a45c ffffed0039968270 ffff8801da001280 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report+0x21/0x30 mm/kasan/report.c:310 [] check_memory_region_inline mm/kasan/kasan.c:308 [inline] [] check_memory_region+0x137/0x190 mm/kasan/kasan.c:315 [] memcpy+0x23/0x50 mm/kasan/kasan.c:350 [] pfkey_msg2xfrm_state net/key/af_key.c:1219 [inline] [] pfkey_add+0x153e/0x3470 net/key/af_key.c:1498 [] pfkey_process+0x61e/0x730 net/key/af_key.c:2826 [] pfkey_sendmsg+0x3a9/0x760 net/key/af_key.c:3670 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1968 [] __sys_sendmsg+0xd6/0x190 net/socket.c:2002 [] SYSC_sendmsg net/socket.c:2013 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2009 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801ccb41180, in cache kmalloc-512 size: 512 Allocated: PID = 3316 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] __kmalloc_track_caller+0xda/0x2b0 mm/slub.c:4232 __kmalloc_reserve.isra.37+0x33/0xc0 net/core/skbuff.c:138 __alloc_skb+0x119/0x600 net/core/skbuff.c:231 alloc_skb include/linux/skbuff.h:919 [inline] pfkey_sendmsg+0x135/0x760 net/key/af_key.c:3657 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1968 __sys_sendmsg+0xd6/0x190 net/socket.c:2002 SYSC_sendmsg net/socket.c:2013 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2009 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 0 (stack is not available) Memory state around the buggy address: ffff8801ccb41280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801ccb41300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801ccb41380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801ccb41400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801ccb41480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================