[....] Starting enhanced syslogd: rsyslogd[ 12.519324] audit: type=1400 audit(1515931428.768:5): avc: denied { syslog } for pid=3507 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 16.581848] audit: type=1400 audit(1515931432.830:6): avc: denied { map } for pid=3647 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.15.202' (ECDSA) to the list of known hosts. executing program [ 22.805979] audit: type=1400 audit(1515931439.054:7): avc: denied { map } for pid=3661 comm="syzkaller238463" path="/root/syzkaller238463806" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 executing program [ 22.887330] [ 22.888992] ========================= [ 22.892759] WARNING: held lock freed! [ 22.896523] 4.15.0-rc7-next-20180112+ #96 Not tainted [ 22.901682] ------------------------- [ 22.905454] syzkaller238463/3664 is freeing memory 00000000e3af092e-00000000fcc6ebb4, with a lock still held there! [ 22.915991] (sk_lock-AF_INET6){+.+.}, at: [<0000000044fc5164>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 22.924898] 1 lock held by syzkaller238463/3664: [ 22.930714] #0: (sk_lock-AF_INET6){+.+.}, at: [<0000000044fc5164>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 22.940413] [ 22.940413] stack backtrace: [ 22.946268] CPU: 0 PID: 3664 Comm: syzkaller238463 Not tainted 4.15.0-rc7-next-20180112+ #96 [ 22.955675] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.964998] Call Trace: [ 22.967570] dump_stack+0x194/0x257 [ 22.971168] ? arch_local_irq_restore+0x53/0x53 [ 22.976172] debug_check_no_locks_freed+0x32f/0x3c0 [ 22.981423] kmem_cache_free+0x68/0x2b0 [ 22.985372] __sk_destruct+0x622/0x910 [ 22.989227] ? kfree+0xd9/0x260 [ 22.992502] ? sock_rfree+0x160/0x160 [ 22.996274] ? sock_sendmsg+0xca/0x110 [ 23.000136] ? SyS_sendto+0x40/0x50 [ 23.003733] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 23.009415] ? debug_check_no_obj_freed+0x611/0xf1f [ 23.014409] ? check_noncircular+0x20/0x20 [ 23.018621] ? print_irqtrace_events+0x270/0x270 [ 23.023353] ? __local_bh_enable_ip+0x121/0x230 [ 23.027993] ? sctp_put_port+0x495/0x640 [ 23.032022] ? sctp_poll+0xc00/0xc00 [ 23.035708] ? refcount_sub_and_test+0x115/0x1b0 [ 23.040431] ? refcount_inc+0x50/0x50 [ 23.044195] ? refcount_inc+0x50/0x50 [ 23.047978] sk_destruct+0x47/0x80 [ 23.051496] __sk_free+0xf1/0x2b0 [ 23.054916] sk_free+0x2a/0x40 [ 23.058083] sctp_association_put+0x14c/0x2f0 [ 23.062545] ? sctp_association_hold+0x20/0x20 [ 23.067103] ? lock_sock_nested+0x91/0x110 [ 23.071304] ? trace_hardirqs_on+0xd/0x10 [ 23.075419] ? __local_bh_enable_ip+0x121/0x230 [ 23.080057] sctp_wait_for_sndbuf+0x673/0x8d0 [ 23.084522] ? sctp_init_sock+0x13b0/0x13b0 [ 23.088813] ? do_raw_spin_trylock+0x190/0x190 [ 23.093359] ? __local_bh_enable_ip+0x121/0x230 [ 23.097992] ? sctp_prsctp_prune+0x97/0x790 [ 23.102287] ? prepare_to_wait+0x4d0/0x4d0 [ 23.106489] ? trace_hardirqs_on+0xd/0x10 [ 23.110607] sctp_sendmsg+0x28f7/0x33f0 [ 23.114553] ? sctp_id2assoc+0x390/0x390 [ 23.118584] ? avc_has_perm+0x43e/0x680 [ 23.122527] ? avc_has_perm_noaudit+0x520/0x520 [ 23.127169] ? __fget+0x35c/0x570 [ 23.130593] ? iterate_fd+0x3f0/0x3f0 [ 23.134368] ? find_held_lock+0x35/0x1d0 [ 23.138402] ? sock_has_perm+0x2a4/0x420 [ 23.142434] ? lock_release+0x972/0xa40 [ 23.146390] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.152248] ? __check_object_size+0x8b/0x530 [ 23.156714] inet_sendmsg+0x11f/0x5e0 [ 23.160481] ? inet_sendmsg+0x11f/0x5e0 [ 23.164422] ? __might_sleep+0x95/0x190 [ 23.168369] ? inet_create+0xf50/0xf50 [ 23.172231] ? selinux_socket_sendmsg+0x36/0x40 [ 23.176878] ? security_socket_sendmsg+0x89/0xb0 [ 23.181602] ? inet_create+0xf50/0xf50 [ 23.185460] sock_sendmsg+0xca/0x110 [ 23.189147] SYSC_sendto+0x361/0x5c0 [ 23.192830] ? SYSC_connect+0x4a0/0x4a0 [ 23.197122] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 23.203147] ? __do_page_fault+0x3d6/0xc90 [ 23.207362] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 23.212620] ? SyS_futex+0x269/0x390 [ 23.216301] ? SyS_setsockopt+0x215/0x360 [ 23.220415] ? do_futex+0x22a0/0x22a0 [ 23.224186] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 23.229707] SyS_sendto+0x40/0x50 [ 23.233138] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 23.238126] RIP: 0033:0x4457e9 [ 23.241282] RSP: 002b:00007f307d8e3da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 23.248959] RAX: ffffffffffffffda RBX: 00000000006dac54 RCX: 00000000004457e9 [ 23.256372] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000003 [ 23.264043] RBP: 00000000006dac50 R08: 00000000204d9000 R09: 000000000000001c [ 23.271639] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 23.278876] R13: 00007fff8eef17ff R14: 00007f307d8e49c0 R15: 0000000000000001 [ 23.286288] ================================================================== [ 23.293636] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 23.300275] Read of size 4 at addr ffff8801d951e88c by task syzkaller238463/3664 [ 23.308639] [ 23.310237] CPU: 0 PID: 3664 Comm: syzkaller238463 Not tainted 4.15.0-rc7-next-20180112+ #96 [ 23.318775] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.328104] Call Trace: [ 23.330667] dump_stack+0x194/0x257 [ 23.334268] ? arch_local_irq_restore+0x53/0x53 executing program [ 23.338906] ? show_regs_print_info+0x18/0x18 [ 23.343376] ? lock_acquire+0x1d5/0x580 [ 23.347319] ? trace_hardirqs_on+0xd/0x10 [ 23.351433] ? do_raw_spin_lock+0x1e0/0x220 [ 23.355726] print_address_description+0x73/0x250 [ 23.360546] ? do_raw_spin_lock+0x1e0/0x220 [ 23.364834] kasan_report+0x23b/0x360 [ 23.368604] __asan_report_load4_noabort+0x14/0x20 [ 23.373500] do_raw_spin_lock+0x1e0/0x220 [ 23.377621] _raw_spin_lock_bh+0x39/0x40 [ 23.381654] ? release_sock+0x74/0x2a0 [ 23.385510] release_sock+0x74/0x2a0 [ 23.389192] ? sctp_prsctp_prune+0x97/0x790 [ 23.393481] ? __release_sock+0x360/0x360 [ 23.397605] ? trace_hardirqs_on+0xd/0x10 [ 23.401729] sctp_sendmsg+0x2993/0x33f0 [ 23.405690] ? sctp_id2assoc+0x390/0x390 [ 23.409723] ? avc_has_perm+0x43e/0x680 [ 23.413666] ? avc_has_perm_noaudit+0x520/0x520 [ 23.418303] ? __fget+0x35c/0x570 [ 23.421725] ? iterate_fd+0x3f0/0x3f0 [ 23.425497] ? find_held_lock+0x35/0x1d0 [ 23.429534] ? sock_has_perm+0x2a4/0x420 [ 23.433570] ? lock_release+0x972/0xa40 [ 23.437511] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.443372] ? __check_object_size+0x8b/0x530 [ 23.447835] inet_sendmsg+0x11f/0x5e0 [ 23.451611] ? inet_sendmsg+0x11f/0x5e0 [ 23.455552] ? __might_sleep+0x95/0x190 [ 23.459493] ? inet_create+0xf50/0xf50 [ 23.463356] ? selinux_socket_sendmsg+0x36/0x40 [ 23.467992] ? security_socket_sendmsg+0x89/0xb0 [ 23.472720] ? inet_create+0xf50/0xf50 [ 23.476593] sock_sendmsg+0xca/0x110 [ 23.480284] SYSC_sendto+0x361/0x5c0 [ 23.483964] ? SYSC_connect+0x4a0/0x4a0 [ 23.487915] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 23.493246] ? __do_page_fault+0x3d6/0xc90 [ 23.497452] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 23.502714] ? SyS_futex+0x269/0x390 [ 23.506394] ? SyS_setsockopt+0x215/0x360 [ 23.510510] ? do_futex+0x22a0/0x22a0 [ 23.514288] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 23.519102] SyS_sendto+0x40/0x50 [ 23.522533] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 23.527263] RIP: 0033:0x4457e9 [ 23.530425] RSP: 002b:00007f307d8e3da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 23.538465] RAX: ffffffffffffffda RBX: 00000000006dac54 RCX: 00000000004457e9 [ 23.545702] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000003 [ 23.552944] RBP: 00000000006dac50 R08: 00000000204d9000 R09: 000000000000001c [ 23.560178] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 23.567421] R13: 00007fff8eef17ff R14: 00007f307d8e49c0 R15: 0000000000000001 [ 23.574680] [ 23.576276] Allocated by task 3665: [ 23.580658] save_stack+0x43/0xd0 [ 23.584077] kasan_kmalloc+0xad/0xe0 [ 23.587756] kasan_slab_alloc+0x12/0x20 [ 23.591869] kmem_cache_alloc+0x12e/0x760 [ 23.595983] sk_prot_alloc+0x65/0x2a0 [ 23.600014] sk_alloc+0x105/0x1440 [ 23.604398] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 23.609207] sctp_accept+0x5c4/0x970 [ 23.612891] inet_accept+0x12c/0x930 [ 23.616574] SYSC_accept4+0x38d/0x870 [ 23.620341] SyS_accept+0x26/0x30 [ 23.623763] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 23.628483] [ 23.630081] Freed by task 3664: [ 23.633333] save_stack+0x43/0xd0 [ 23.636755] __kasan_slab_free+0x11a/0x170 [ 23.640953] kasan_slab_free+0xe/0x10 [ 23.644719] kmem_cache_free+0x86/0x2b0 [ 23.648670] __sk_destruct+0x622/0x910 [ 23.652522] sk_destruct+0x47/0x80 [ 23.656025] __sk_free+0xf1/0x2b0 [ 23.659441] sk_free+0x2a/0x40 [ 23.662603] sctp_association_put+0x14c/0x2f0 [ 23.667067] sctp_wait_for_sndbuf+0x673/0x8d0 [ 23.671528] sctp_sendmsg+0x28f7/0x33f0 [ 23.675468] inet_sendmsg+0x11f/0x5e0 [ 23.679234] sock_sendmsg+0xca/0x110 [ 23.682912] SYSC_sendto+0x361/0x5c0 [ 23.686591] SyS_sendto+0x40/0x50 [ 23.690010] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 23.694727] [ 23.696324] The buggy address belongs to the object at ffff8801d951e800 [ 23.696324] which belongs to the cache SCTPv6 of size 1888 [ 23.708604] The buggy address is located 140 bytes inside of [ 23.708604] 1888-byte region [ffff8801d951e800, ffff8801d951ef60) [ 23.720529] The buggy address belongs to the page: [ 23.725430] page:ffffea0007654780 count:1 mapcount:0 mapping:ffff8801d951e000 index:0x0 [ 23.733539] flags: 0x2fffc0000000100(slab) [ 23.737747] raw: 02fffc0000000100 ffff8801d951e000 0000000000000000 0000000100000002 [ 23.745592] raw: ffffea00074a05a0 ffffea000766fa60 ffff8801d280b200 0000000000000000 [ 23.753438] page dumped because: kasan: bad access detected [ 23.759122] [ 23.760720] Memory state around the buggy address: [ 23.765613] ffff8801d951e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.773197] ffff8801d951e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.780522] >ffff8801d951e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.787845] ^ [ 23.791442] ffff8801d951e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.799299] ffff8801d951e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.806621] ================================================================== [ 23.813995] Kernel panic - not syncing: panic_on_warn set ... [ 23.813995] [ 23.821343] CPU: 0 PID: 3664 Comm: syzkaller238463 Tainted: G B 4.15.0-rc7-next-20180112+ #96 [ 23.831189] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.840523] Call Trace: [ 23.843089] dump_stack+0x194/0x257 [ 23.846689] ? arch_local_irq_restore+0x53/0x53 [ 23.851597] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.856324] ? vsnprintf+0x1ed/0x1900 [ 23.860092] ? do_raw_spin_lock+0x110/0x220 [ 23.864393] panic+0x1e4/0x41c [ 23.867559] ? refcount_error_report+0x214/0x214 [ 23.872285] ? add_taint+0x1c/0x50 [ 23.875794] ? add_taint+0x1c/0x50 [ 23.879742] ? do_raw_spin_lock+0x1e0/0x220 [ 23.884506] kasan_end_report+0x50/0x50 executing program [ 23.888451] kasan_report+0x148/0x360 [ 23.892237] __asan_report_load4_noabort+0x14/0x20 [ 23.897141] do_raw_spin_lock+0x1e0/0x220 [ 23.901274] _raw_spin_lock_bh+0x39/0x40 [ 23.905305] ? release_sock+0x74/0x2a0 [ 23.909169] release_sock+0x74/0x2a0 [ 23.912853] ? sctp_prsctp_prune+0x97/0x790 [ 23.917244] ? __release_sock+0x360/0x360 [ 23.921623] ? trace_hardirqs_on+0xd/0x10 [ 23.925745] sctp_sendmsg+0x2993/0x33f0 [ 23.929691] ? sctp_id2assoc+0x390/0x390 [ 23.933720] ? avc_has_perm+0x43e/0x680 [ 23.937661] ? avc_has_perm_noaudit+0x520/0x520 [ 23.942472] ? __fget+0x35c/0x570 [ 23.945894] ? iterate_fd+0x3f0/0x3f0 [ 23.949665] ? find_held_lock+0x35/0x1d0 [ 23.953696] ? sock_has_perm+0x2a4/0x420 [ 23.957725] ? lock_release+0x972/0xa40 [ 23.961672] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.967702] ? __check_object_size+0x8b/0x530 [ 23.972168] inet_sendmsg+0x11f/0x5e0 [ 23.975933] ? inet_sendmsg+0x11f/0x5e0 [ 23.979879] ? __might_sleep+0x95/0x190 [ 23.983832] ? inet_create+0xf50/0xf50 [ 23.988400] ? selinux_socket_sendmsg+0x36/0x40 [ 23.993072] ? security_socket_sendmsg+0x89/0xb0 [ 23.997809] ? inet_create+0xf50/0xf50 [ 24.001674] sock_sendmsg+0xca/0x110 [ 24.005703] SYSC_sendto+0x361/0x5c0 [ 24.009398] ? SYSC_connect+0x4a0/0x4a0 [ 24.013344] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 24.018707] ? __do_page_fault+0x3d6/0xc90 [ 24.022923] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 24.028180] ? SyS_futex+0x269/0x390 [ 24.031864] ? SyS_setsockopt+0x215/0x360 [ 24.035983] ? do_futex+0x22a0/0x22a0 [ 24.039756] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 24.044574] SyS_sendto+0x40/0x50 [ 24.047996] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.052724] RIP: 0033:0x4457e9 [ 24.055879] RSP: 002b:00007f307d8e3da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 24.064167] RAX: ffffffffffffffda RBX: 00000000006dac54 RCX: 00000000004457e9 [ 24.071404] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000003 [ 24.078640] RBP: 00000000006dac50 R08: 00000000204d9000 R09: 000000000000001c [ 24.085876] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 24.093373] R13: 00007fff8eef17ff R14: 00007f307d8e49c0 R15: 0000000000000001 [ 24.100664] Dumping ftrace buffer: [ 24.104172] (ftrace buffer empty) [ 24.107849] Kernel Offset: disabled [ 24.111444] Rebooting in 86400 seconds..