netlink: 28 bytes leftover after parsing attributes in process `syz-executor5'. ================================================================== BUG: KASAN: slab-out-of-bounds in pfkey_msg2xfrm_state net/key/af_key.c:1188 [inline] BUG: KASAN: slab-out-of-bounds in pfkey_add+0x2537/0x3220 net/key/af_key.c:1506 Read of size 7168 at addr ffff8800ac0c4f18 by task syz-executor7/8200 CPU: 0 PID: 8200 Comm: syz-executor7 Not tainted 4.4.133-g3f51ea2 #51 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 e5cf62d700eb5383 ffff8801d20ff740 ffffffff81e0e4cd ffffea0002b03100 ffff8800ac0c4f18 0000000000000000 ffff8800ac0c5100 ffff8800ac0c4f00 ffff8801d20ff778 ffffffff815154cc ffff8800ac0c4f18 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 binder: 8205:8206 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 8205:8206 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 [] 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:1188 [inline] [] pfkey_add+0x2537/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 [] SYSC_sendmsg net/socket.c:2007 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2003 [] entry_SYSCALL_64_fastpath+0x22/0x9e Allocated by task 8200: [] 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 [] SYSC_sendmsg net/socket.c:2007 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2003 [] entry_SYSCALL_64_fastpath+0x22/0x9e Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8800ac0c4f00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of 512-byte region [ffff8800ac0c4f00, ffff8800ac0c5100) The buggy address belongs to the page: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] __sigqueue_alloc+0xe3/0x400 kernel/signal.c:373 PGD b8e0e067 PUD b65fa067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 8205 Comm: syz-executor6 Not tainted 4.4.133-g3f51ea2 #51 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800acb04800 task.stack: ffff8800b6260000 RIP: 0010:[] [] __sigqueue_alloc+0xe3/0x400 kernel/signal.c:373 RSP: 0000:ffff8800b6267bc0 EFLAGS: 00010046 RAX: dffffc0000000000 RBX: ffff8800acb04800 RCX: 0000000000000000 RDX: 1ffff100398aa2b0 RSI: ffffffff811549c8 RDI: ffff8801cc551580 RBP: ffff8800b6267bf0 R08: ffff8800acb05128 R09: 0000000000000001 R10: 0000000000000001 R11: ffff8800acb04800 R12: 0000000000000000 R13: 0000000000000001 R14: 0000000002280020 R15: 000000000000000b FS: 0000000001793940(0063) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000000b6055000 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff81154910 ffff8800acb04800 0000000000000004 ffff8800acb04f98 0000000000000000 ffff8800b6267d48 ffff8800b6267c68 ffffffff81157285 0000000000000046 0000000000000000 ffffffff00030001 0000000a00000000 Call Trace: [] __send_signal+0x1a5/0x11b0 kernel/signal.c:1029 [] send_signal+0x4a/0xc0 kernel/signal.c:1096 [] specific_send_sig_info kernel/signal.c:1141 [inline] [] force_sig_info+0x20a/0x310 kernel/signal.c:1189 [] force_sig_info_fault.constprop.23+0x158/0x1b0 arch/x86/mm/fault.c:187 [] __bad_area_nosemaphore+0x219/0x310 arch/x86/mm/fault.c:807 [] __bad_area arch/x86/mm/fault.c:837 [inline] [] bad_area+0x66/0x80 arch/x86/mm/fault.c:843 [] __do_page_fault+0x767/0xa10 arch/x86/mm/fault.c:1225 [] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1308 [] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1037 Code: 49 8d bc 24 80 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 d2 02 00 00 4d 8b a4 24 80 00 00 00 41 ff 04 24 f0 41 ff 44 24 08 e8 9d 28 12 00 85 c0 74 12 e8 RIP [] __sigqueue_alloc+0xe3/0x400 kernel/signal.c:373 RSP CR2: 0000000000000000 ---[ end trace fc5bca1f81f04f24 ]---