[....] Starting enhanced syslogd: rsyslogd[ 13.367805] audit: type=1400 audit(1515932086.648:5): avc: denied { syslog } for pid=3508 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: [ 18.495285] audit: type=1400 audit(1515932091.776:6): avc: denied { map } for pid=3649 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.243' (ECDSA) to the list of known hosts. executing program [ 24.740125] audit: type=1400 audit(1515932098.020:7): avc: denied { map } for pid=3664 comm="syzkaller593575" path="/root/syzkaller593575826" 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 executing program executing program [ 24.991352] [ 24.993013] ========================= [ 24.996789] WARNING: held lock freed! [ 25.000566] 4.15.0-rc7+ #187 Not tainted [ 25.004603] ------------------------- [ 25.008384] syzkaller593575/3673 is freeing memory 00000000b2014a96-000000004ec46073, with a lock still held there! [ 25.018936] (sk_lock-AF_INET6){+.+.}, at: [<0000000027f725b7>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.027850] 1 lock held by syzkaller593575/3673: [ 25.032579] #0: (sk_lock-AF_INET6){+.+.}, at: [<0000000027f725b7>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.041916] [ 25.041916] stack backtrace: [ 25.046383] CPU: 0 PID: 3673 Comm: syzkaller593575 Not tainted 4.15.0-rc7+ #187 [ 25.053813] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.063140] Call Trace: [ 25.065708] dump_stack+0x194/0x257 [ 25.069312] ? arch_local_irq_restore+0x53/0x53 [ 25.073973] debug_check_no_locks_freed+0x32f/0x3c0 [ 25.078967] kmem_cache_free+0x68/0x2a0 [ 25.082926] __sk_destruct+0x622/0x910 [ 25.086784] ? save_stack+0x43/0xd0 [ 25.090385] ? sock_rfree+0x160/0x160 [ 25.094159] ? sctp_sendmsg+0x28f7/0x33f0 [ 25.098277] ? sock_sendmsg+0xca/0x110 [ 25.102136] ? SYSC_sendto+0x361/0x5c0 [ 25.105994] ? SyS_sendto+0x40/0x50 [ 25.109609] ? entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.114515] ? check_noncircular+0x20/0x20 [ 25.118736] ? print_irqtrace_events+0x270/0x270 [ 25.123467] ? __local_bh_enable_ip+0x121/0x230 [ 25.128118] ? sctp_put_port+0x495/0x640 [ 25.132152] ? sctp_poll+0xc00/0xc00 [ 25.135844] ? refcount_sub_and_test+0x115/0x1b0 [ 25.140570] ? refcount_inc+0x50/0x50 [ 25.144342] ? refcount_inc+0x50/0x50 [ 25.148126] sk_destruct+0x47/0x80 [ 25.151641] __sk_free+0xf1/0x2b0 [ 25.155068] sk_free+0x2a/0x40 [ 25.158234] sctp_association_put+0x14c/0x2f0 [ 25.162707] ? sctp_association_hold+0x20/0x20 [ 25.167258] ? lock_sock_nested+0x91/0x110 [ 25.171463] ? trace_hardirqs_on+0xd/0x10 [ 25.175590] ? __local_bh_enable_ip+0x121/0x230 [ 25.180237] sctp_wait_for_sndbuf+0x673/0x8d0 [ 25.184712] ? sctp_init_sock+0x13b0/0x13b0 [ 25.189007] ? do_raw_spin_trylock+0x190/0x190 [ 25.193558] ? __local_bh_enable_ip+0x121/0x230 [ 25.198201] ? sctp_prsctp_prune+0x97/0x790 [ 25.202508] ? prepare_to_wait+0x4d0/0x4d0 [ 25.206802] ? trace_hardirqs_on+0xd/0x10 [ 25.210930] sctp_sendmsg+0x28f7/0x33f0 [ 25.214884] ? sctp_id2assoc+0x390/0x390 [ 25.218935] ? avc_has_perm+0x43e/0x680 [ 25.222881] ? avc_has_perm_noaudit+0x520/0x520 [ 25.227521] ? __fget+0x35c/0x570 [ 25.230959] ? iterate_fd+0x3f0/0x3f0 [ 25.234746] ? find_held_lock+0x35/0x1d0 [ 25.238786] ? sock_has_perm+0x2a4/0x420 [ 25.242821] ? lock_release+0x9a2/0xa40 [ 25.246777] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.252636] ? __check_object_size+0x25d/0x4f0 [ 25.257194] inet_sendmsg+0x11f/0x5e0 [ 25.260973] ? inet_sendmsg+0x11f/0x5e0 [ 25.264931] ? __might_sleep+0x95/0x190 [ 25.268886] ? inet_create+0xf50/0xf50 [ 25.272755] ? selinux_socket_sendmsg+0x36/0x40 [ 25.277405] ? security_socket_sendmsg+0x89/0xb0 [ 25.282133] ? inet_create+0xf50/0xf50 [ 25.286007] sock_sendmsg+0xca/0x110 [ 25.289696] SYSC_sendto+0x361/0x5c0 [ 25.293385] ? SYSC_connect+0x4a0/0x4a0 [ 25.297337] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 25.302684] ? __do_page_fault+0x3d6/0xc90 [ 25.306903] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.312165] ? SyS_futex+0x269/0x390 [ 25.315853] ? SyS_setsockopt+0x215/0x360 [ 25.319976] ? do_futex+0x22a0/0x22a0 [ 25.323765] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.328592] SyS_sendto+0x40/0x50 [ 25.332019] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.336754] RIP: 0033:0x4457e9 [ 25.339915] RSP: 002b:00007fe16167dda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.347595] RAX: ffffffffffffffda RBX: 00000000006dac84 RCX: 00000000004457e9 [ 25.354838] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000005 [ 25.362084] RBP: 00000000006dac80 R08: 00000000204d9000 R09: 000000000000001c [ 25.369329] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 25.376570] R13: 00007ffe39d18ddf R14: 00007fe16167e9c0 R15: 0000000000000001 [ 25.383944] ================================================================== [ 25.391296] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 25.397939] Read of size 4 at addr ffff8801d97a388c by task syzkaller593575/3673 [ 25.405443] [ 25.407047] CPU: 0 PID: 3673 Comm: syzkaller593575 Not tainted 4.15.0-rc7+ #187 [ 25.414464] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.423801] Call Trace: [ 25.426373] dump_stack+0x194/0x257 [ 25.429991] ? arch_local_irq_restore+0x53/0x53 [ 25.434655] ? show_regs_print_info+0x18/0x18 [ 25.439128] ? lock_acquire+0x1d5/0x580 executing program [ 25.443074] ? trace_hardirqs_on+0xd/0x10 [ 25.447206] ? do_raw_spin_lock+0x1e0/0x220 [ 25.451500] print_address_description+0x73/0x250 [ 25.456320] ? do_raw_spin_lock+0x1e0/0x220 [ 25.460618] kasan_report+0x25b/0x340 [ 25.464403] __asan_report_load4_noabort+0x14/0x20 [ 25.469317] do_raw_spin_lock+0x1e0/0x220 [ 25.473442] _raw_spin_lock_bh+0x39/0x40 [ 25.477480] ? release_sock+0x74/0x2a0 [ 25.481351] release_sock+0x74/0x2a0 [ 25.485038] ? sctp_prsctp_prune+0x97/0x790 [ 25.489332] ? __release_sock+0x360/0x360 [ 25.493451] ? trace_hardirqs_on+0xd/0x10 [ 25.497588] sctp_sendmsg+0x2993/0x33f0 [ 25.501548] ? sctp_id2assoc+0x390/0x390 [ 25.505588] ? avc_has_perm+0x43e/0x680 [ 25.509538] ? avc_has_perm_noaudit+0x520/0x520 [ 25.514187] ? __fget+0x35c/0x570 [ 25.517624] ? iterate_fd+0x3f0/0x3f0 [ 25.521409] ? find_held_lock+0x35/0x1d0 [ 25.525452] ? sock_has_perm+0x2a4/0x420 [ 25.529486] ? lock_release+0x9a2/0xa40 [ 25.533449] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.539309] ? __check_object_size+0x25d/0x4f0 [ 25.543880] inet_sendmsg+0x11f/0x5e0 [ 25.547658] ? inet_sendmsg+0x11f/0x5e0 [ 25.551605] ? __might_sleep+0x95/0x190 [ 25.555553] ? inet_create+0xf50/0xf50 [ 25.559419] ? selinux_socket_sendmsg+0x36/0x40 [ 25.564060] ? security_socket_sendmsg+0x89/0xb0 [ 25.568789] ? inet_create+0xf50/0xf50 [ 25.572651] sock_sendmsg+0xca/0x110 [ 25.576338] SYSC_sendto+0x361/0x5c0 [ 25.580026] ? SYSC_connect+0x4a0/0x4a0 [ 25.583987] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 25.589324] ? __do_page_fault+0x3d6/0xc90 [ 25.594152] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.599414] ? SyS_futex+0x269/0x390 [ 25.603101] ? SyS_setsockopt+0x215/0x360 [ 25.607232] ? do_futex+0x22a0/0x22a0 [ 25.611018] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.615849] SyS_sendto+0x40/0x50 [ 25.619277] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.624005] RIP: 0033:0x4457e9 [ 25.627170] RSP: 002b:00007fe16167dda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.634856] RAX: ffffffffffffffda RBX: 00000000006dac84 RCX: 00000000004457e9 [ 25.642107] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000005 [ 25.649349] RBP: 00000000006dac80 R08: 00000000204d9000 R09: 000000000000001c [ 25.656591] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 25.663848] R13: 00007ffe39d18ddf R14: 00007fe16167e9c0 R15: 0000000000000001 [ 25.671106] [ 25.672707] Allocated by task 3674: [ 25.676321] save_stack+0x43/0xd0 [ 25.679748] kasan_kmalloc+0xad/0xe0 [ 25.683444] kasan_slab_alloc+0x12/0x20 [ 25.687485] kmem_cache_alloc+0x12e/0x760 [ 25.691606] sk_prot_alloc+0x65/0x2a0 [ 25.695378] sk_alloc+0x105/0x1440 [ 25.698892] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 25.703807] sctp_accept+0x5c4/0x970 [ 25.707511] inet_accept+0x12c/0x930 [ 25.711200] SYSC_accept4+0x38d/0x870 [ 25.714973] SyS_accept+0x26/0x30 [ 25.718401] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.723123] [ 25.724809] Freed by task 3673: [ 25.728065] save_stack+0x43/0xd0 [ 25.731491] kasan_slab_free+0x71/0xc0 [ 25.735356] kmem_cache_free+0x83/0x2a0 [ 25.739310] __sk_destruct+0x622/0x910 [ 25.743170] sk_destruct+0x47/0x80 [ 25.746687] __sk_free+0xf1/0x2b0 [ 25.750113] sk_free+0x2a/0x40 [ 25.753291] sctp_association_put+0x14c/0x2f0 [ 25.757761] sctp_wait_for_sndbuf+0x673/0x8d0 [ 25.762279] sctp_sendmsg+0x28f7/0x33f0 [ 25.766237] inet_sendmsg+0x11f/0x5e0 [ 25.770017] sock_sendmsg+0xca/0x110 [ 25.773716] SYSC_sendto+0x361/0x5c0 [ 25.777410] SyS_sendto+0x40/0x50 [ 25.780844] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.785574] [ 25.787177] The buggy address belongs to the object at ffff8801d97a3800 [ 25.787177] which belongs to the cache SCTPv6 of size 1888 [ 25.799459] The buggy address is located 140 bytes inside of [ 25.799459] 1888-byte region [ffff8801d97a3800, ffff8801d97a3f60) [ 25.811390] The buggy address belongs to the page: [ 25.816294] page:ffffea000765e8c0 count:1 mapcount:0 mapping:ffff8801d97a3000 index:0x0 [ 25.824420] flags: 0x2fffc0000000100(slab) [ 25.828638] raw: 02fffc0000000100 ffff8801d97a3000 0000000000000000 0000000100000002 [ 25.836501] raw: ffffea00076603a0 ffffea0006edcbe0 ffff8801d2c17e40 0000000000000000 [ 25.844355] page dumped because: kasan: bad access detected [ 25.850035] [ 25.851639] Memory state around the buggy address: [ 25.856541] ffff8801d97a3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.863872] ffff8801d97a3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.871204] >ffff8801d97a3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.878538] ^ [ 25.882143] ffff8801d97a3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.889486] ffff8801d97a3980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.896813] ================================================================== [ 25.904204] Kernel panic - not syncing: panic_on_warn set ... [ 25.904204] [ 25.911549] CPU: 0 PID: 3673 Comm: syzkaller593575 Tainted: G B 4.15.0-rc7+ #187 [ 25.920270] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.929599] Call Trace: [ 25.932176] dump_stack+0x194/0x257 [ 25.935783] ? arch_local_irq_restore+0x53/0x53 [ 25.940435] ? trace_hardirqs_on_thunk+0x1a/0x1c executing program [ 25.945171] ? vsnprintf+0x1ed/0x1900 [ 25.948951] ? do_raw_spin_lock+0x140/0x220 [ 25.953260] panic+0x1e4/0x41c [ 25.956430] ? refcount_error_report+0x214/0x214 [ 25.961159] ? add_taint+0x1c/0x50 [ 25.964684] ? add_taint+0x1c/0x50 [ 25.968210] ? do_raw_spin_lock+0x1e0/0x220 [ 25.972513] kasan_end_report+0x50/0x50 [ 25.976467] kasan_report+0x144/0x340 [ 25.980256] __asan_report_load4_noabort+0x14/0x20 [ 25.985168] do_raw_spin_lock+0x1e0/0x220 [ 25.989304] _raw_spin_lock_bh+0x39/0x40 [ 25.993339] ? release_sock+0x74/0x2a0 [ 25.997202] release_sock+0x74/0x2a0 [ 26.000891] ? sctp_prsctp_prune+0x97/0x790 [ 26.005206] ? __release_sock+0x360/0x360 [ 26.009331] ? trace_hardirqs_on+0xd/0x10 [ 26.013471] sctp_sendmsg+0x2993/0x33f0 [ 26.017430] ? sctp_id2assoc+0x390/0x390 [ 26.021467] ? avc_has_perm+0x43e/0x680 [ 26.025418] ? avc_has_perm_noaudit+0x520/0x520 [ 26.030063] ? __fget+0x35c/0x570 [ 26.033494] ? iterate_fd+0x3f0/0x3f0 [ 26.037283] ? find_held_lock+0x35/0x1d0 [ 26.041332] ? sock_has_perm+0x2a4/0x420 [ 26.045378] ? lock_release+0x9a2/0xa40 [ 26.049330] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.055189] ? __check_object_size+0x25d/0x4f0 [ 26.059749] inet_sendmsg+0x11f/0x5e0 [ 26.063535] ? inet_sendmsg+0x11f/0x5e0 [ 26.067485] ? __might_sleep+0x95/0x190 [ 26.071444] ? inet_create+0xf50/0xf50 [ 26.075308] ? selinux_socket_sendmsg+0x36/0x40 [ 26.079952] ? security_socket_sendmsg+0x89/0xb0 [ 26.084687] ? inet_create+0xf50/0xf50 [ 26.088560] sock_sendmsg+0xca/0x110 [ 26.092252] SYSC_sendto+0x361/0x5c0 [ 26.095940] ? SYSC_connect+0x4a0/0x4a0 [ 26.099891] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 26.105235] ? __do_page_fault+0x3d6/0xc90 [ 26.109450] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 26.114716] ? SyS_futex+0x269/0x390 [ 26.118420] ? SyS_setsockopt+0x215/0x360 [ 26.122545] ? do_futex+0x22a0/0x22a0 [ 26.126335] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 26.131171] SyS_sendto+0x40/0x50 [ 26.134601] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.139328] RIP: 0033:0x4457e9 [ 26.142495] RSP: 002b:00007fe16167dda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.150174] RAX: ffffffffffffffda RBX: 00000000006dac84 RCX: 00000000004457e9 [ 26.157416] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000005 [ 26.164667] RBP: 00000000006dac80 R08: 00000000204d9000 R09: 000000000000001c [ 26.171911] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.179161] R13: 00007ffe39d18ddf R14: 00007fe16167e9c0 R15: 0000000000000001 [ 26.186804] Dumping ftrace buffer: [ 26.190376] (ftrace buffer empty) [ 26.194063] Kernel Offset: disabled [ 26.197697] Rebooting in 86400 seconds..