executing program syzkaller login: [ 23.423044] device lo entered promiscuous mode executing program [ 23.517223] ================================================================== [ 23.517978] BUG: KASAN: use-after-free in sctp_association_free+0x7b7/0x930 [ 23.518621] Read of size 8 at addr ffff8800699b4560 by task syzkaller481386/2993 [ 23.519241] [ 23.519377] CPU: 2 PID: 2993 Comm: syzkaller481386 Not tainted 4.14.0-rc5-next-20171018+ #8 [ 23.520053] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 23.520780] Call Trace: [ 23.521003] dump_stack+0x194/0x257 [ 23.521303] ? arch_local_irq_restore+0x53/0x53 [ 23.521685] ? show_regs_print_info+0x65/0x65 [ 23.522106] ? sctp_association_free+0x7b7/0x930 [ 23.522511] print_address_description+0x73/0x250 [ 23.522897] ? sctp_association_free+0x7b7/0x930 [ 23.523333] kasan_report+0x25b/0x340 [ 23.523668] __asan_report_load8_noabort+0x14/0x20 [ 23.524168] sctp_association_free+0x7b7/0x930 [ 23.524551] ? sctp_asconf_queue_teardown+0x700/0x700 [ 23.525022] ? sctp_init_sock+0x1350/0x1350 [ 23.525373] ? sctp_sched_fcfs_dequeue+0x290/0x290 [ 23.525767] ? finish_wait+0x490/0x490 [ 23.526108] sctp_sendmsg+0x1845/0x32b0 [ 23.526466] ? sctp_id2assoc+0x390/0x390 [ 23.526870] ? check_noncircular+0x20/0x20 [ 23.527279] ? iterate_fd+0x3f0/0x3f0 [ 23.527636] ? __pmd_alloc+0x4e0/0x4e0 [ 23.527992] ? find_held_lock+0x35/0x1d0 [ 23.528408] ? __might_fault+0x110/0x1d0 [ 23.528801] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 23.529249] ? __check_object_size+0x25d/0x4f0 [ 23.529621] inet_sendmsg+0x11f/0x5e0 [ 23.529924] ? inet_sendmsg+0x11f/0x5e0 [ 23.530248] ? __might_sleep+0x95/0x190 [ 23.530566] ? inet_recvmsg+0x5f0/0x5f0 [ 23.530886] ? selinux_socket_sendmsg+0x36/0x40 [ 23.531367] ? security_socket_sendmsg+0x89/0xb0 [ 23.531745] ? inet_recvmsg+0x5f0/0x5f0 [ 23.532071] sock_sendmsg+0xca/0x110 [ 23.532372] SYSC_sendto+0x352/0x5a0 [ 23.532673] ? SYSC_connect+0x470/0x470 [ 23.533038] ? mm_fault_error+0x2c0/0x2c0 [ 23.533378] ? do_raw_spin_trylock+0x190/0x190 [ 23.533758] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.534168] ? syscall_return_slowpath+0x2b3/0x510 [ 23.534559] ? finish_task_switch+0x1f6/0x740 [ 23.534920] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 23.535326] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 23.535714] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.536122] SyS_sendto+0x40/0x50 [ 23.536406] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.536813] RIP: 0033:0x43c309 [ 23.537073] RSP: 002b:00007f2275054db8 EFLAGS: 00000206 ORIG_RAX: 000000000000002c [ 23.537682] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043c309 [ 23.539107] RDX: 0000000000000002 RSI: 0000000020925000 RDI: 0000000000000003 [ 23.539679] RBP: 0000000000000082 R08: 00000000209e1000 R09: 000000000000001c [ 23.540259] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 [ 23.540845] R13: 0000000000000000 R14: 00007f22750559c0 R15: 00007f2275055700 [ 23.541440] [ 23.541574] Allocated by task 2993: [ 23.541866] save_stack+0x43/0xd0 [ 23.542149] kasan_kmalloc+0xad/0xe0 [ 23.542446] kmem_cache_alloc_trace+0x136/0x750 [ 23.542818] sctp_association_new+0x114/0x21e0 [ 23.543187] sctp_sendmsg+0x1c89/0x32b0 [ 23.543505] inet_sendmsg+0x11f/0x5e0 [ 23.543808] sock_sendmsg+0xca/0x110 [ 23.544111] SYSC_sendto+0x352/0x5a0 [ 23.544408] SyS_sendto+0x40/0x50 [ 23.544685] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.545176] [ 23.545309] Freed by task 2993: [ 23.545573] save_stack+0x43/0xd0 [ 23.545850] kasan_slab_free+0x71/0xc0 [ 23.546166] kfree+0xca/0x250 [ 23.546416] sctp_association_put+0x21c/0x2f0 [ 23.546773] sctp_wait_for_sndbuf+0x5e3/0x7c0 [ 23.547136] sctp_sendmsg+0x2906/0x32b0 [ 23.547454] inet_sendmsg+0x11f/0x5e0 [ 23.547756] sock_sendmsg+0xca/0x110 [ 23.548058] SYSC_sendto+0x352/0x5a0 [ 23.548354] SyS_sendto+0x40/0x50 [ 23.548631] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.549051] [ 23.549186] The buggy address belongs to the object at ffff8800699b4540 [ 23.549186] which belongs to the cache kmalloc-4096 of size 4096 [ 23.550199] The buggy address is located 32 bytes inside of [ 23.550199] 4096-byte region [ffff8800699b4540, ffff8800699b5540) [ 23.551168] The buggy address belongs to the page: [ 23.551565] page:ffffea0001a66d00 count:1 mapcount:0 mapping:ffff8800699b4540 index:0x0 compound_mapcount: 0 [ 23.552360] flags: 0x500000000008100(slab|head) [ 23.552751] raw: 0500000000008100 ffff8800699b4540 0000000000000000 0000000100000001 [ 23.553408] raw: ffffea0001a26020 ffffea0001a2d8a0 ffff88003e800dc0 0000000000000000 [ 23.554040] page dumped because: kasan: bad access detected [ 23.554496] [ 23.554628] Memory state around the buggy address: [ 23.555030] ffff8800699b4400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.555612] ffff8800699b4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.556206] >ffff8800699b4500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 23.556804] ^ [ 23.557327] ffff8800699b4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.557939] ffff8800699b4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.558566] ================================================================== [ 23.559187] Disabling lock debugging due to kernel taint [ 23.559922] Kernel panic - not syncing: panic_on_warn set ... [ 23.559922] [ 23.560569] CPU: 2 PID: 2993 Comm: syzkaller481386 Tainted: G B 4.14.0-rc5-next-20171018+ #8 [ 23.561399] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 23.562062] Call Trace: [ 23.562272] dump_stack+0x194/0x257 [ 23.562565] ? arch_local_irq_restore+0x53/0x53 [ 23.562949] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.563329] ? vsnprintf+0x1ed/0x1900 [ 23.563635] ? sctp_association_free+0x6f0/0x930 [ 23.564022] panic+0x1e4/0x41c [ 23.564284] ? refcount_error_report+0x214/0x214 [ 23.564660] ? add_taint+0x1c/0x50 [ 23.564984] ? add_taint+0x1c/0x50 [ 23.565312] ? sctp_association_free+0x7b7/0x930 [ 23.565745] kasan_end_report+0x50/0x50 [ 23.566105] kasan_report+0x144/0x340 [ 23.566453] __asan_report_load8_noabort+0x14/0x20 [ 23.566900] sctp_association_free+0x7b7/0x930 [ 23.567320] ? sctp_asconf_queue_teardown+0x700/0x700 [ 23.567790] ? sctp_init_sock+0x1350/0x1350 [ 23.568246] ? sctp_sched_fcfs_dequeue+0x290/0x290 [ 23.568605] ? finish_wait+0x490/0x490 [ 23.568900] sctp_sendmsg+0x1845/0x32b0 [ 23.569197] ? sctp_id2assoc+0x390/0x390 [ 23.569506] ? check_noncircular+0x20/0x20 [ 23.569819] ? iterate_fd+0x3f0/0x3f0 [ 23.570098] ? __pmd_alloc+0x4e0/0x4e0 [ 23.570382] ? find_held_lock+0x35/0x1d0 [ 23.570679] ? __might_fault+0x110/0x1d0 [ 23.570975] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 23.571365] ? __check_object_size+0x25d/0x4f0 [ 23.571698] inet_sendmsg+0x11f/0x5e0 [ 23.571973] ? inet_sendmsg+0x11f/0x5e0 [ 23.572262] ? __might_sleep+0x95/0x190 [ 23.572551] ? inet_recvmsg+0x5f0/0x5f0 [ 23.572921] ? selinux_socket_sendmsg+0x36/0x40 [ 23.573388] ? security_socket_sendmsg+0x89/0xb0 [ 23.573795] ? inet_recvmsg+0x5f0/0x5f0 [ 23.574141] sock_sendmsg+0xca/0x110 [ 23.574461] SYSC_sendto+0x352/0x5a0 [ 23.574781] ? SYSC_connect+0x470/0x470 [ 23.575128] ? mm_fault_error+0x2c0/0x2c0 [ 23.575486] ? do_raw_spin_trylock+0x190/0x190 [ 23.575883] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.576317] ? syscall_return_slowpath+0x2b3/0x510 [ 23.579438] ? finish_task_switch+0x1f6/0x740 [ 23.579833] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 23.580572] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 23.580887] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.581290] SyS_sendto+0x40/0x50 [ 23.581599] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.581988] RIP: 0033:0x43c309 [ 23.582242] RSP: 002b:00007f2275054db8 EFLAGS: 00000206 ORIG_RAX: 000000000000002c [ 23.582889] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043c309 [ 23.583502] RDX: 0000000000000002 RSI: 0000000020925000 RDI: 0000000000000003 [ 23.584098] RBP: 0000000000000082 R08: 00000000209e1000 R09: 000000000000001c [ 23.584785] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 [ 23.585413] R13: 0000000000000000 R14: 00007f22750559c0 R15: 00007f2275055700 [ 23.586090] Dumping ftrace buffer: [ 23.586348] (ftrace buffer empty) [ 23.586618] Kernel Offset: disabled [ 23.586889] Rebooting in 86400 seconds..