================================================================== BUG: KASAN: slab-out-of-bounds in pfkey_msg2xfrm_state net/key/af_key.c:1227 [inline] BUG: KASAN: slab-out-of-bounds in pfkey_add+0x145d/0x3220 net/key/af_key.c:1506 Read of size 6880 at addr ffff8800af98ec98 by task syz-executor1/31968 CPU: 1 PID: 31968 Comm: syz-executor1 Not tainted 4.4.133-g3f51ea2 #49 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 389907e0fdcf832e ffff8801b9f076c0 ffffffff81e0e4cd ffffea0002be6380 ffff8800af98ec98 0000000000000000 ffff8800af98ee80 ffff8800af98ec80 ffff8801b9f076f8 ffffffff815154cc ffff8800af98ec98 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x6c/0x216 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report.cold.7+0x175/0x2f7 mm/kasan/report.c:408 [] check_memory_region_inline mm/kasan/kasan.c:325 [inline] [] check_memory_region+0x14f/0x1b0 mm/kasan/kasan.c:332 [] memcpy+0x23/0x50 mm/kasan/kasan.c:367 [] pfkey_msg2xfrm_state net/key/af_key.c:1227 [inline] [] pfkey_add+0x145d/0x3220 net/key/af_key.c:1506 [] pfkey_process+0x671/0x740 net/key/af_key.c:2834 [] pfkey_sendmsg+0x346/0xae0 net/key/af_key.c:3678 [] sock_sendmsg_nosec net/socket.c:625 [inline] [] sock_sendmsg+0xcc/0x110 net/socket.c:635 [] ___sys_sendmsg+0x745/0x880 net/socket.c:1962 [] __sys_sendmsg+0xd6/0x190 net/socket.c:1996 [] C_SYSC_sendmsg net/compat.c:722 [inline] [] compat_SyS_sendmsg+0x2a/0x40 net/compat.c:720 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 Allocated by task 31968: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:616 [] kasan_krealloc+0x64/0x80 mm/kasan/kasan.c:654 [] ksize+0x8a/0xf0 mm/slub.c:3727 [] __alloc_skb+0x133/0x600 net/core/skbuff.c:237 [] alloc_skb include/linux/skbuff.h:815 [inline] [] pfkey_sendmsg+0xfe/0xae0 net/key/af_key.c:3665 [] sock_sendmsg_nosec net/socket.c:625 [inline] [] sock_sendmsg+0xcc/0x110 net/socket.c:635 [] ___sys_sendmsg+0x745/0x880 net/socket.c:1962 [] __sys_sendmsg+0xd6/0x190 net/socket.c:1996 [] C_SYSC_sendmsg net/compat.c:722 [inline] [] compat_SyS_sendmsg+0x2a/0x40 net/compat.c:720 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 Freed by task 30646: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [ 431.187833] netlink: 4 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor4'. [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xf4/0x310 mm/slub.c:3749 [] snd_seq_release+0x88/0xb0 sound/core/seq/seq_clientmgr.c:384 [] __fput+0x235/0x6f0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x9e5/0x26b0 kernel/exit.c:759 [] do_group_exit+0x111/0x330 kernel/exit.c:889 [] get_signal+0x4ec/0x14b0 kernel/signal.c:2317 [] do_signal+0x8b/0x1d30 arch/x86/kernel/signal.c:712 [] exit_to_usermode_loop+0x11a/0x160 arch/x86/entry/common.c:248 [] prepare_exit_to_usermode arch/x86/entry/common.c:283 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:348 [inline] [] do_syscall_32_irqs_on arch/x86/entry/common.c:398 [inline] [] do_fast_syscall_32+0x620/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 The buggy address belongs to the object at ffff8800af98ec80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of 512-byte region [ffff8800af98ec80, ffff8800af98ee80) The buggy address belongs to the page: BUG: unable to handle kernel paging request at 0000000c0300030a IP: [] find_stack lib/stackdepot.c:174 [inline] IP: [] depot_save_stack+0x168/0x610 lib/stackdepot.c:225 PGD 0 Oops: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 3870 Comm: syz-executor7 Not tainted 4.4.133-g3f51ea2 #49 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d8fe4800 task.stack: ffff8800a3af0000 RIP: 0010:[] [] find_stack lib/stackdepot.c:174 [inline] RIP: 0010:[] [] depot_save_stack+0x168/0x610 lib/stackdepot.c:225 RSP: 0018:ffff8800a3af7890 EFLAGS: 00010293 RAX: ffff8801d8fe4800 RBX: 00000000c586f59a RCX: 00000000773dd94c RDX: 0000000000000000 RSI: ffffffff81eb6e58 RDI: ffff8800a3af78f8 RBP: ffff8800a3af78e8 R08: ffff8800a3af78f8 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000c03000302 R13: 000000000006f59a R14: 000000000000000c R15: 0000000000000060 FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000c0300030a CR3: 000000000440c000 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: 0200000041b58ab3 ffff8800a3af7910 9a1bd45d00000003 ffff8800a3af78f8 0000000000000000 9a1bd45d7e4a38e6 0000000002000000 ffff8800a3a490f8 ffff8800a3a491b0 ffffffff814a502f 0000000000000246 ffff8800a3af7b18 Call Trace: [] save_stack+0xa9/0xd0 mm/kasan/kasan.c:518 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xbe/0x340 mm/slub.c:2881 [] remove_vma+0x11f/0x160 mm/mmap.c:292 [] exit_mmap+0x25f/0x3a0 mm/mmap.c:2938 [] __mmput kernel/fork.c:715 [inline] [] mmput+0xf8/0x2d0 kernel/fork.c:735 [] exit_mm kernel/exit.c:444 [inline] [] do_exit+0x8d8/0x26b0 kernel/exit.c:746 [] do_group_exit+0x111/0x330 kernel/exit.c:889 [] SYSC_exit_group kernel/exit.c:900 [inline] [] SyS_exit_group+0x1d/0x20 kernel/exit.c:898 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 Code: 00 00 00 e8 fb a4 49 ff 49 63 c6 48 c1 e0 03 49 89 c7 eb 12 e8 ea a4 49 ff 4d 8b 24 24 4d 85 e4 0f 84 8a 00 00 00 e8 d8 a4 49 ff <41> 39 5c 24 08 75 e2 e8 cc a4 49 ff 45 3b 74 24 0c 75 d6 e8 c0 RIP [] find_stack lib/stackdepot.c:174 [inline] RIP [] depot_save_stack+0x168/0x610 lib/stackdepot.c:225 RSP CR2: 0000000c0300030a ---[ end trace df4d8444714ff438 ]---