[ 13.016430] audit: type=1400 audit(1515929550.074:5): avc: denied { syslog } for pid=3504 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.925080] audit: type=1400 audit(1515929555.982:6): avc: denied { map } for pid=3654 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.0.2' (ECDSA) to the list of known hosts. executing program [ 25.162727] audit: type=1400 audit(1515929562.220:7): avc: denied { map } for pid=3669 comm="syzkaller593135" path="/root/syzkaller593135331" 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 [ 25.337824] [ 25.339483] ========================= [ 25.343251] WARNING: held lock freed! [ 25.347028] 4.15.0-rc7-mm1+ #56 Not tainted [ 25.351322] ------------------------- [ 25.355097] syzkaller593135/3673 is freeing memory 00000000695df0cc-000000001a8f50c0, with a lock still held there! [ 25.365633] (sk_lock-AF_INET6){+.+.}, at: [<00000000047ef894>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.374561] 1 lock held by syzkaller593135/3673: [ 25.379283] #0: (sk_lock-AF_INET6){+.+.}, at: [<00000000047ef894>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.388616] [ 25.388616] stack backtrace: [ 25.393084] CPU: 1 PID: 3673 Comm: syzkaller593135 Not tainted 4.15.0-rc7-mm1+ #56 [ 25.400786] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.410108] Call Trace: [ 25.412672] dump_stack+0x194/0x257 [ 25.416270] ? arch_local_irq_restore+0x53/0x53 [ 25.420935] debug_check_no_locks_freed+0x32f/0x3c0 [ 25.426038] kmem_cache_free+0x68/0x2b0 [ 25.430000] __sk_destruct+0x622/0x910 [ 25.433864] ? kfree+0xd9/0x260 [ 25.437115] ? sock_rfree+0x160/0x160 [ 25.440886] ? sock_sendmsg+0xca/0x110 [ 25.444744] ? SyS_sendto+0x40/0x50 [ 25.448343] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.453246] ? debug_check_no_obj_freed+0x611/0xf1f [ 25.458234] ? check_noncircular+0x20/0x20 [ 25.462437] ? print_irqtrace_events+0x270/0x270 [ 25.467167] ? __local_bh_enable_ip+0x121/0x230 [ 25.471808] ? sctp_put_port+0x495/0x640 [ 25.475841] ? sctp_poll+0xc00/0xc00 [ 25.479529] ? refcount_sub_and_test+0x115/0x1b0 [ 25.484255] ? refcount_inc+0x50/0x50 [ 25.488024] ? refcount_inc+0x50/0x50 [ 25.491796] sk_destruct+0x47/0x80 [ 25.495305] __sk_free+0xf1/0x2b0 [ 25.498729] sk_free+0x2a/0x40 [ 25.501909] sctp_association_put+0x14c/0x2f0 [ 25.506374] ? sctp_association_hold+0x20/0x20 [ 25.510928] ? lock_sock_nested+0x91/0x110 [ 25.515135] ? trace_hardirqs_on+0xd/0x10 [ 25.519255] ? __local_bh_enable_ip+0x121/0x230 [ 25.523898] sctp_wait_for_sndbuf+0x673/0x8d0 [ 25.528370] ? sctp_init_sock+0x13b0/0x13b0 [ 25.532664] ? do_raw_spin_trylock+0x190/0x190 [ 25.537216] ? __local_bh_enable_ip+0x121/0x230 [ 25.541855] ? sctp_prsctp_prune+0x97/0x790 [ 25.546150] ? prepare_to_wait+0x4d0/0x4d0 [ 25.550355] ? trace_hardirqs_on+0xd/0x10 [ 25.554487] sctp_sendmsg+0x28f7/0x33f0 [ 25.558442] ? sctp_id2assoc+0x390/0x390 [ 25.562484] ? avc_has_perm+0x43e/0x680 [ 25.566441] ? avc_has_perm_noaudit+0x520/0x520 [ 25.571084] ? __fget+0x35c/0x570 [ 25.574514] ? iterate_fd+0x3f0/0x3f0 [ 25.578302] ? find_held_lock+0x35/0x1d0 [ 25.582348] ? sock_has_perm+0x2a4/0x420 [ 25.586391] ? lock_release+0x9a2/0xa40 [ 25.590336] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.596191] ? __check_object_size+0x8b/0x530 [ 25.600660] inet_sendmsg+0x11f/0x5e0 [ 25.604432] ? inet_sendmsg+0x11f/0x5e0 [ 25.608378] ? __might_sleep+0x95/0x190 [ 25.612323] ? inet_create+0xf50/0xf50 [ 25.616193] ? selinux_socket_sendmsg+0x36/0x40 [ 25.620844] ? security_socket_sendmsg+0x89/0xb0 [ 25.625571] ? inet_create+0xf50/0xf50 [ 25.629432] sock_sendmsg+0xca/0x110 [ 25.633120] SYSC_sendto+0x361/0x5c0 [ 25.636817] ? SYSC_connect+0x4a0/0x4a0 [ 25.640766] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 25.646100] ? __do_page_fault+0x3d6/0xc90 [ 25.650319] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.655591] ? SyS_futex+0x269/0x390 [ 25.659276] ? SyS_setsockopt+0x215/0x360 [ 25.663398] ? do_futex+0x22a0/0x22a0 [ 25.667174] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 25.671994] SyS_sendto+0x40/0x50 [ 25.675435] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.680162] RIP: 0033:0x4457e9 [ 25.683323] RSP: 002b:00007f360a7c4da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.691007] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 25.698252] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 25.705492] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 25.712733] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 25.719975] R13: 00007ffc0718980f R14: 00007f360a7c59c0 R15: 0000000000000001 [ 25.727376] ================================================================== [ 25.734727] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 25.741369] Read of size 4 at addr ffff8801bae0208c by task syzkaller593135/3673 [ 25.748871] [ 25.750472] CPU: 1 PID: 3673 Comm: syzkaller593135 Not tainted 4.15.0-rc7-mm1+ #56 [ 25.758164] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.767504] Call Trace: [ 25.770076] dump_stack+0x194/0x257 [ 25.773675] ? arch_local_irq_restore+0x53/0x53 [ 25.778326] ? show_regs_print_info+0x18/0x18 [ 25.782805] ? lock_acquire+0x1d5/0x580 executing program [ 25.786760] ? trace_hardirqs_on+0xd/0x10 [ 25.790879] ? do_raw_spin_lock+0x1e0/0x220 [ 25.795174] print_address_description+0x73/0x250 [ 25.800007] ? do_raw_spin_lock+0x1e0/0x220 [ 25.804331] kasan_report+0x23b/0x360 [ 25.808106] __asan_report_load4_noabort+0x14/0x20 [ 25.813014] do_raw_spin_lock+0x1e0/0x220 [ 25.817139] _raw_spin_lock_bh+0x39/0x40 [ 25.821173] ? release_sock+0x74/0x2a0 [ 25.825032] release_sock+0x74/0x2a0 [ 25.828716] ? sctp_prsctp_prune+0x97/0x790 [ 25.833011] ? __release_sock+0x360/0x360 [ 25.837133] ? trace_hardirqs_on+0xd/0x10 [ 25.841258] sctp_sendmsg+0x2993/0x33f0 [ 25.845211] ? sctp_id2assoc+0x390/0x390 [ 25.849249] ? avc_has_perm+0x43e/0x680 [ 25.853206] ? avc_has_perm_noaudit+0x520/0x520 [ 25.857848] ? __fget+0x35c/0x570 [ 25.861275] ? iterate_fd+0x3f0/0x3f0 [ 25.865051] ? find_held_lock+0x35/0x1d0 [ 25.869098] ? sock_has_perm+0x2a4/0x420 [ 25.873138] ? lock_release+0x9a2/0xa40 [ 25.877084] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.882946] ? __check_object_size+0x8b/0x530 [ 25.887417] inet_sendmsg+0x11f/0x5e0 [ 25.891186] ? inet_sendmsg+0x11f/0x5e0 [ 25.895129] ? __might_sleep+0x95/0x190 [ 25.899075] ? inet_create+0xf50/0xf50 [ 25.902939] ? selinux_socket_sendmsg+0x36/0x40 [ 25.907579] ? security_socket_sendmsg+0x89/0xb0 [ 25.912305] ? inet_create+0xf50/0xf50 [ 25.916165] sock_sendmsg+0xca/0x110 [ 25.919851] SYSC_sendto+0x361/0x5c0 [ 25.923538] ? SYSC_connect+0x4a0/0x4a0 [ 25.927488] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 25.932822] ? __do_page_fault+0x3d6/0xc90 [ 25.937033] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.942297] ? SyS_futex+0x269/0x390 [ 25.945985] ? SyS_setsockopt+0x215/0x360 [ 25.950107] ? do_futex+0x22a0/0x22a0 [ 25.953881] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 25.958700] SyS_sendto+0x40/0x50 [ 25.962128] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.966855] RIP: 0033:0x4457e9 [ 25.970019] RSP: 002b:00007f360a7c4da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.977697] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 25.984940] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 25.992190] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 25.999442] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.006683] R13: 00007ffc0718980f R14: 00007f360a7c59c0 R15: 0000000000000001 [ 26.013943] [ 26.015548] Allocated by task 3678: [ 26.019152] save_stack+0x43/0xd0 [ 26.022574] kasan_kmalloc+0xad/0xe0 [ 26.026267] kasan_slab_alloc+0x12/0x20 [ 26.030209] kmem_cache_alloc+0x12e/0x760 [ 26.034329] sk_prot_alloc+0x65/0x2a0 [ 26.038099] sk_alloc+0x105/0x1440 [ 26.041614] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 26.046428] sctp_accept+0x5c4/0x970 [ 26.050112] inet_accept+0x12c/0x930 [ 26.053797] SYSC_accept4+0x38d/0x870 [ 26.057574] SyS_accept+0x26/0x30 [ 26.060999] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 26.065723] [ 26.067320] Freed by task 3673: [ 26.070570] save_stack+0x43/0xd0 [ 26.074000] __kasan_slab_free+0x11a/0x170 [ 26.078207] kasan_slab_free+0xe/0x10 [ 26.081977] kmem_cache_free+0x86/0x2b0 [ 26.085920] __sk_destruct+0x622/0x910 [ 26.089778] sk_destruct+0x47/0x80 [ 26.093286] __sk_free+0xf1/0x2b0 [ 26.096742] sk_free+0x2a/0x40 [ 26.099904] sctp_association_put+0x14c/0x2f0 [ 26.104369] sctp_wait_for_sndbuf+0x673/0x8d0 [ 26.108834] sctp_sendmsg+0x28f7/0x33f0 [ 26.112780] inet_sendmsg+0x11f/0x5e0 [ 26.116551] sock_sendmsg+0xca/0x110 [ 26.120241] SYSC_sendto+0x361/0x5c0 [ 26.123923] SyS_sendto+0x40/0x50 [ 26.127357] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 26.132084] [ 26.133685] The buggy address belongs to the object at ffff8801bae02000 [ 26.133685] which belongs to the cache SCTPv6 of size 1888 [ 26.145969] The buggy address is located 140 bytes inside of [ 26.145969] 1888-byte region [ffff8801bae02000, ffff8801bae02760) [ 26.157898] The buggy address belongs to the page: [ 26.162799] page:ffffea0006eb8080 count:1 mapcount:0 mapping:ffff8801bae02000 index:0x0 [ 26.170921] flags: 0x2fffc0000000100(slab) [ 26.175130] raw: 02fffc0000000100 ffff8801bae02000 0000000000000000 0000000100000002 [ 26.182984] raw: ffffea00074be960 ffffea0006eb6ce0 ffff8801d2f9c9c0 0000000000000000 [ 26.190832] page dumped because: kasan: bad access detected [ 26.196509] [ 26.198105] Memory state around the buggy address: [ 26.203006] ffff8801bae01f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.210346] ffff8801bae02000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.217674] >ffff8801bae02080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.225013] ^ [ 26.228611] ffff8801bae02100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.235938] ffff8801bae02180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.243265] ================================================================== [ 26.250641] Kernel panic - not syncing: panic_on_warn set ... [ 26.250641] [ 26.258003] CPU: 1 PID: 3673 Comm: syzkaller593135 Tainted: G B 4.15.0-rc7-mm1+ #56 [ 26.267004] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.276341] Call Trace: [ 26.278936] dump_stack+0x194/0x257 [ 26.282566] ? arch_local_irq_restore+0x53/0x53 [ 26.287221] ? trace_hardirqs_on_thunk+0x1a/0x1c executing program [ 26.291966] ? vsnprintf+0x1ed/0x1900 [ 26.295748] ? do_raw_spin_lock+0x140/0x220 [ 26.300053] panic+0x1e4/0x41c [ 26.303233] ? refcount_error_report+0x214/0x214 [ 26.307962] ? add_taint+0x1c/0x50 [ 26.311473] ? add_taint+0x1c/0x50 [ 26.314986] ? do_raw_spin_lock+0x1e0/0x220 [ 26.319281] kasan_end_report+0x50/0x50 [ 26.323241] kasan_report+0x148/0x360 [ 26.327038] __asan_report_load4_noabort+0x14/0x20 [ 26.331943] do_raw_spin_lock+0x1e0/0x220 [ 26.336073] _raw_spin_lock_bh+0x39/0x40 [ 26.340107] ? release_sock+0x74/0x2a0 [ 26.343982] release_sock+0x74/0x2a0 [ 26.347667] ? sctp_prsctp_prune+0x97/0x790 [ 26.351967] ? __release_sock+0x360/0x360 [ 26.356090] ? trace_hardirqs_on+0xd/0x10 [ 26.360217] sctp_sendmsg+0x2993/0x33f0 [ 26.364172] ? sctp_id2assoc+0x390/0x390 [ 26.368206] ? avc_has_perm+0x43e/0x680 [ 26.372153] ? avc_has_perm_noaudit+0x520/0x520 [ 26.376798] ? __fget+0x35c/0x570 [ 26.380227] ? iterate_fd+0x3f0/0x3f0 [ 26.384005] ? find_held_lock+0x35/0x1d0 [ 26.388048] ? sock_has_perm+0x2a4/0x420 [ 26.392083] ? lock_release+0x9a2/0xa40 [ 26.396028] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.401889] ? __check_object_size+0x8b/0x530 [ 26.406359] inet_sendmsg+0x11f/0x5e0 [ 26.410130] ? inet_sendmsg+0x11f/0x5e0 [ 26.414075] ? __might_sleep+0x95/0x190 [ 26.418020] ? inet_create+0xf50/0xf50 [ 26.421879] ? selinux_socket_sendmsg+0x36/0x40 [ 26.426518] ? security_socket_sendmsg+0x89/0xb0 [ 26.431254] ? inet_create+0xf50/0xf50 [ 26.435115] sock_sendmsg+0xca/0x110 [ 26.438801] SYSC_sendto+0x361/0x5c0 [ 26.442495] ? SYSC_connect+0x4a0/0x4a0 [ 26.446442] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 26.451776] ? __do_page_fault+0x3d6/0xc90 [ 26.455993] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 26.461258] ? SyS_futex+0x269/0x390 [ 26.464944] ? SyS_setsockopt+0x215/0x360 [ 26.469065] ? do_futex+0x22a0/0x22a0 [ 26.472840] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 26.477658] SyS_sendto+0x40/0x50 [ 26.481097] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 26.485824] RIP: 0033:0x4457e9 [ 26.488986] RSP: 002b:00007f360a7c4da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.496665] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 26.503907] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 26.511150] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 26.518392] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.525634] R13: 00007ffc0718980f R14: 00007f360a7c59c0 R15: 0000000000000001 [ 26.533358] Dumping ftrace buffer: [ 26.536884] (ftrace buffer empty) [ 26.540562] Kernel Offset: disabled [ 26.544159] Rebooting in 86400 seconds..