[....] Starting enhanced syslogd: rsyslogd[ 13.440217] audit: type=1400 audit(1515891275.365:5): avc: denied { syslog } for pid=3502 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: [ 19.165260] audit: type=1400 audit(1515891281.091:6): avc: denied { map } for pid=3642 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.63' (ECDSA) to the list of known hosts. executing program executing program [ 25.428437] audit: type=1400 audit(1515891287.354:7): avc: denied { map } for pid=3656 comm="syzkaller489760" path="/root/syzkaller489760115" 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 [ 25.539842] [ 25.541483] ========================= [ 25.545249] WARNING: held lock freed! [ 25.549017] 4.15.0-rc7+ #260 Not tainted [ 25.553043] ------------------------- [ 25.556819] syzkaller489760/3658 is freeing memory 000000001a9c9604-000000006594c68d, with a lock still held there! [ 25.567354] (sk_lock-AF_INET6){+.+.}, at: [<000000004a2909b7>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.576256] 1 lock held by syzkaller489760/3658: [ 25.580977] #0: (sk_lock-AF_INET6){+.+.}, at: [<000000004a2909b7>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.590309] [ 25.590309] stack backtrace: [ 25.594779] CPU: 1 PID: 3658 Comm: syzkaller489760 Not tainted 4.15.0-rc7+ #260 [ 25.602188] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.611507] Call Trace: [ 25.614066] dump_stack+0x194/0x257 [ 25.617666] ? arch_local_irq_restore+0x53/0x53 [ 25.622306] debug_check_no_locks_freed+0x32f/0x3c0 [ 25.627291] kmem_cache_free+0x68/0x2a0 [ 25.631232] __sk_destruct+0x622/0x910 [ 25.635084] ? kasan_slab_free+0x71/0xc0 [ 25.639113] ? sock_rfree+0x160/0x160 [ 25.642882] ? inet_sendmsg+0x11f/0x5e0 [ 25.646826] ? SYSC_sendto+0x361/0x5c0 [ 25.650677] ? SyS_sendto+0x40/0x50 [ 25.654273] ? entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.659171] ? check_noncircular+0x20/0x20 [ 25.663372] ? print_irqtrace_events+0x270/0x270 [ 25.668096] ? free_obj_work+0x690/0x690 [ 25.672123] ? sctp_put_port+0x495/0x640 [ 25.676150] ? sctp_poll+0xc00/0xc00 [ 25.679833] ? refcount_sub_and_test+0x115/0x1b0 [ 25.684561] ? refcount_inc+0x50/0x50 [ 25.688328] ? refcount_inc+0x50/0x50 [ 25.692095] sk_destruct+0x47/0x80 [ 25.695600] __sk_free+0x57/0x230 [ 25.699147] sk_free+0x2a/0x40 [ 25.702305] sctp_association_put+0x14c/0x2f0 [ 25.706764] ? sctp_association_hold+0x20/0x20 [ 25.711308] ? lock_sock_nested+0x91/0x110 [ 25.715508] ? trace_hardirqs_on+0xd/0x10 [ 25.719633] ? __local_bh_enable_ip+0x121/0x230 [ 25.724272] sctp_wait_for_sndbuf+0x673/0x8d0 [ 25.728737] ? sctp_init_sock+0x13b0/0x13b0 [ 25.733038] ? do_raw_spin_trylock+0x190/0x190 [ 25.737596] ? __local_bh_enable_ip+0x121/0x230 [ 25.742232] ? sctp_prsctp_prune+0x97/0x6f0 [ 25.746527] ? prepare_to_wait+0x4d0/0x4d0 [ 25.750733] ? trace_hardirqs_on+0xd/0x10 [ 25.754866] sctp_sendmsg+0x277d/0x3360 [ 25.758811] ? sctp_id2assoc+0x390/0x390 [ 25.762843] ? avc_has_perm+0x43e/0x680 [ 25.766786] ? avc_has_perm_noaudit+0x520/0x520 [ 25.771419] ? __fget+0x35c/0x570 [ 25.774844] ? iterate_fd+0x3f0/0x3f0 [ 25.778616] ? find_held_lock+0x35/0x1d0 [ 25.782649] ? sock_has_perm+0x2a4/0x420 [ 25.786677] ? lock_release+0x962/0xa40 [ 25.790615] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.796464] ? __check_object_size+0x25d/0x4f0 [ 25.801015] inet_sendmsg+0x11f/0x5e0 [ 25.804781] ? inet_sendmsg+0x11f/0x5e0 [ 25.808718] ? __might_sleep+0x95/0x190 [ 25.812660] ? inet_recvmsg+0x5f0/0x5f0 [ 25.816602] ? selinux_socket_sendmsg+0x36/0x40 [ 25.821235] ? security_socket_sendmsg+0x89/0xb0 [ 25.825955] ? inet_recvmsg+0x5f0/0x5f0 [ 25.829898] sock_sendmsg+0xca/0x110 [ 25.833580] SYSC_sendto+0x361/0x5c0 [ 25.837267] ? SYSC_connect+0x4a0/0x4a0 [ 25.841208] ? up_read+0x1a/0x40 [ 25.844545] ? __do_page_fault+0x3d6/0xc90 [ 25.848756] ? __do_page_fault+0xc90/0xc90 [ 25.852958] ? SyS_futex+0x269/0x390 [ 25.856636] ? SyS_setsockopt+0x215/0x360 [ 25.860752] ? do_futex+0x22a0/0x22a0 [ 25.864520] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.869341] SyS_sendto+0x40/0x50 [ 25.872765] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.877486] RIP: 0033:0x4457e9 [ 25.880641] RSP: 002b:00007f23d86b1da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.890401] RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 00000000004457e9 [ 25.897647] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 25.904887] RBP: 00000000006dac38 R08: 00000000204d9000 R09: 000000000000001c [ 25.912122] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 25.919364] R13: 00007ffd361ac18f R14: 00007f23d86b29c0 R15: 0000000000000001 [ 25.926720] ================================================================== [ 25.934059] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 25.940700] Read of size 4 at addr ffff8801be0b608c by task syzkaller489760/3658 [ 25.948199] [ 25.949797] CPU: 1 PID: 3658 Comm: syzkaller489760 Not tainted 4.15.0-rc7+ #260 [ 25.957217] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.966536] Call Trace: [ 25.969091] dump_stack+0x194/0x257 [ 25.972690] ? arch_local_irq_restore+0x53/0x53 [ 25.977328] ? show_regs_print_info+0x18/0x18 [ 25.981797] ? lock_acquire+0x1d5/0x580 [ 25.985741] ? trace_hardirqs_on+0xd/0x10 [ 25.989856] ? do_raw_spin_lock+0x1e0/0x220 [ 25.994145] print_address_description+0x73/0x250 [ 25.998963] ? do_raw_spin_lock+0x1e0/0x220 [ 26.003248] kasan_report+0x25b/0x340 [ 26.007014] __asan_report_load4_noabort+0x14/0x20 [ 26.011910] do_raw_spin_lock+0x1e0/0x220 [ 26.016024] _raw_spin_lock_bh+0x39/0x40 [ 26.020048] ? release_sock+0x74/0x2a0 [ 26.023900] release_sock+0x74/0x2a0 [ 26.027579] ? sctp_prsctp_prune+0x97/0x6f0 [ 26.031867] ? __release_sock+0x360/0x360 [ 26.035980] ? trace_hardirqs_on+0xd/0x10 [ 26.040106] sctp_sendmsg+0x2c61/0x3360 [ 26.044050] ? sctp_id2assoc+0x390/0x390 [ 26.048077] ? avc_has_perm+0x43e/0x680 [ 26.052020] ? avc_has_perm_noaudit+0x520/0x520 [ 26.056654] ? __fget+0x35c/0x570 [ 26.060084] ? iterate_fd+0x3f0/0x3f0 [ 26.063856] ? find_held_lock+0x35/0x1d0 [ 26.067889] ? sock_has_perm+0x2a4/0x420 [ 26.071916] ? lock_release+0x962/0xa40 [ 26.075857] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.081705] ? __check_object_size+0x25d/0x4f0 [ 26.086256] inet_sendmsg+0x11f/0x5e0 [ 26.090028] ? inet_sendmsg+0x11f/0x5e0 [ 26.093965] ? __might_sleep+0x95/0x190 [ 26.097905] ? inet_recvmsg+0x5f0/0x5f0 [ 26.102573] ? selinux_socket_sendmsg+0x36/0x40 [ 26.107219] ? security_socket_sendmsg+0x89/0xb0 [ 26.111942] ? inet_recvmsg+0x5f0/0x5f0 [ 26.115883] sock_sendmsg+0xca/0x110 [ 26.119563] SYSC_sendto+0x361/0x5c0 [ 26.123245] ? SYSC_connect+0x4a0/0x4a0 [ 26.127186] ? up_read+0x1a/0x40 [ 26.130521] ? __do_page_fault+0x3d6/0xc90 [ 26.134732] ? __do_page_fault+0xc90/0xc90 [ 26.138938] ? SyS_futex+0x269/0x390 [ 26.142621] ? SyS_setsockopt+0x215/0x360 [ 26.146738] ? do_futex+0x22a0/0x22a0 [ 26.150516] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 26.155334] SyS_sendto+0x40/0x50 [ 26.158754] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.163916] RIP: 0033:0x4457e9 [ 26.167073] RSP: 002b:00007f23d86b1da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.174744] RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 00000000004457e9 [ 26.181979] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 26.189223] RBP: 00000000006dac38 R08: 00000000204d9000 R09: 000000000000001c [ 26.196460] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.203696] R13: 00007ffd361ac18f R14: 00007f23d86b29c0 R15: 0000000000000001 [ 26.210939] [ 26.212536] Allocated by task 3659: [ 26.216136] save_stack+0x43/0xd0 [ 26.219554] kasan_kmalloc+0xad/0xe0 [ 26.223233] kasan_slab_alloc+0x12/0x20 [ 26.227169] kmem_cache_alloc+0x12e/0x760 [ 26.231283] sk_prot_alloc+0x65/0x2a0 [ 26.235047] sk_alloc+0x105/0x1410 [ 26.238560] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 26.243365] sctp_accept+0x5c4/0x970 [ 26.247048] inet_accept+0x12c/0x930 [ 26.250734] SYSC_accept4+0x38d/0x870 [ 26.254500] SyS_accept4+0x2c/0x40 [ 26.258007] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.262729] [ 26.264324] Freed by task 3658: [ 26.267575] save_stack+0x43/0xd0 [ 26.270999] kasan_slab_free+0x71/0xc0 [ 26.274857] kmem_cache_free+0x83/0x2a0 [ 26.278797] __sk_destruct+0x622/0x910 [ 26.282668] sk_destruct+0x47/0x80 [ 26.286179] __sk_free+0x57/0x230 [ 26.289596] sk_free+0x2a/0x40 [ 26.292756] sctp_association_put+0x14c/0x2f0 [ 26.297214] sctp_wait_for_sndbuf+0x673/0x8d0 [ 26.301674] sctp_sendmsg+0x277d/0x3360 [ 26.305613] inet_sendmsg+0x11f/0x5e0 [ 26.309378] sock_sendmsg+0xca/0x110 [ 26.313064] SYSC_sendto+0x361/0x5c0 [ 26.316744] SyS_sendto+0x40/0x50 [ 26.320166] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.324884] [ 26.326481] The buggy address belongs to the object at ffff8801be0b6000 [ 26.326481] which belongs to the cache SCTPv6 of size 1888 [ 26.338754] The buggy address is located 140 bytes inside of [ 26.338754] 1888-byte region [ffff8801be0b6000, ffff8801be0b6760) [ 26.350679] The buggy address belongs to the page: [ 26.355575] page:ffffea0006f82d80 count:1 mapcount:0 mapping:ffff8801be0b6000 index:0x0 [ 26.363686] flags: 0x2fffc0000000100(slab) [ 26.367888] raw: 02fffc0000000100 ffff8801be0b6000 0000000000000000 0000000100000002 [ 26.375742] raw: ffffea0007663b60 ffffea0007189820 ffff8801d33ca080 0000000000000000 [ 26.383586] page dumped because: kasan: bad access detected [ 26.389267] [ 26.390859] Memory state around the buggy address: [ 26.395751] ffff8801be0b5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.403162] ffff8801be0b6000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.410501] >ffff8801be0b6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.417834] ^ [ 26.421426] ffff8801be0b6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.428748] ffff8801be0b6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.436072] ================================================================== [ 26.443443] Kernel panic - not syncing: panic_on_warn set ... [ 26.443443] [ 26.450785] CPU: 1 PID: 3658 Comm: syzkaller489760 Tainted: G B 4.15.0-rc7+ #260 [ 26.459501] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.468822] Call Trace: [ 26.471380] dump_stack+0x194/0x257 [ 26.474987] ? arch_local_irq_restore+0x53/0x53 [ 26.479633] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.484370] ? vsnprintf+0x1ed/0x1900 [ 26.488147] ? do_raw_spin_lock+0x100/0x220 [ 26.492453] panic+0x1e4/0x41c [ 26.495612] ? refcount_error_report+0x214/0x214 [ 26.500337] ? add_taint+0x1c/0x50 [ 26.503858] ? add_taint+0x1c/0x50 [ 26.507373] ? do_raw_spin_lock+0x1e0/0x220 [ 26.511666] kasan_end_report+0x50/0x50 [ 26.515607] kasan_report+0x144/0x340 [ 26.519382] __asan_report_load4_noabort+0x14/0x20 [ 26.524276] do_raw_spin_lock+0x1e0/0x220 [ 26.528402] _raw_spin_lock_bh+0x39/0x40 [ 26.532429] ? release_sock+0x74/0x2a0 [ 26.536282] release_sock+0x74/0x2a0 [ 26.539961] ? sctp_prsctp_prune+0x97/0x6f0 [ 26.544249] ? __release_sock+0x360/0x360 [ 26.548362] ? trace_hardirqs_on+0xd/0x10 [ 26.552479] sctp_sendmsg+0x2c61/0x3360 [ 26.556424] ? sctp_id2assoc+0x390/0x390 [ 26.560452] ? avc_has_perm+0x43e/0x680 [ 26.564402] ? avc_has_perm_noaudit+0x520/0x520 [ 26.569390] ? __fget+0x35c/0x570 [ 26.572816] ? iterate_fd+0x3f0/0x3f0 [ 26.576593] ? find_held_lock+0x35/0x1d0 [ 26.580626] ? sock_has_perm+0x2a4/0x420 [ 26.584657] ? lock_release+0x962/0xa40 [ 26.588606] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.594467] ? __check_object_size+0x25d/0x4f0 [ 26.599019] inet_sendmsg+0x11f/0x5e0 [ 26.602785] ? inet_sendmsg+0x11f/0x5e0 [ 26.606726] ? __might_sleep+0x95/0x190 [ 26.610665] ? inet_recvmsg+0x5f0/0x5f0 [ 26.614604] ? selinux_socket_sendmsg+0x36/0x40 [ 26.619246] ? security_socket_sendmsg+0x89/0xb0 [ 26.623967] ? inet_recvmsg+0x5f0/0x5f0 [ 26.627907] sock_sendmsg+0xca/0x110 [ 26.631587] SYSC_sendto+0x361/0x5c0 [ 26.635267] ? SYSC_connect+0x4a0/0x4a0 [ 26.639209] ? up_read+0x1a/0x40 [ 26.642541] ? __do_page_fault+0x3d6/0xc90 [ 26.646752] ? __do_page_fault+0xc90/0xc90 [ 26.650955] ? SyS_futex+0x269/0x390 [ 26.654644] ? SyS_setsockopt+0x215/0x360 [ 26.658759] ? do_futex+0x22a0/0x22a0 [ 26.662530] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 26.667340] SyS_sendto+0x40/0x50 [ 26.670777] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.675504] RIP: 0033:0x4457e9 [ 26.678661] RSP: 002b:00007f23d86b1da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.686343] RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 00000000004457e9 [ 26.693578] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 26.700816] RBP: 00000000006dac38 R08: 00000000204d9000 R09: 000000000000001c [ 26.708052] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.715375] R13: 00007ffd361ac18f R14: 00007f23d86b29c0 R15: 0000000000000001 [ 26.722661] Dumping ftrace buffer: [ 26.726174] (ftrace buffer empty) [ 26.729853] Kernel Offset: disabled [ 26.733447] Rebooting in 86400 seconds..