[....] Starting enhanced syslogd: rsyslogd[ 12.982700] audit: type=1400 audit(1515910219.201:5): avc: denied { syslog } for pid=3506 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.129605] audit: type=1400 audit(1515910225.348:6): avc: denied { map } for pid=3644 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.17' (ECDSA) to the list of known hosts. executing program [ 25.354496] audit: type=1400 audit(1515910231.573:7): avc: denied { map } for pid=3658 comm="syzkaller174897" path="/root/syzkaller174897692" 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.540178] [ 25.541818] ========================= [ 25.545588] WARNING: held lock freed! [ 25.549359] 4.15.0-rc7+ #261 Not tainted [ 25.553393] ------------------------- [ 25.557173] syzkaller174897/3662 is freeing memory 00000000ba1e8dba-00000000181d302b, with a lock still held there! [ 25.567747] (sk_lock-AF_INET6){+.+.}, at: [<0000000085ad0164>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.576656] 1 lock held by syzkaller174897/3662: [ 25.581381] #0: (sk_lock-AF_INET6){+.+.}, at: [<0000000085ad0164>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 25.590721] [ 25.590721] stack backtrace: [ 25.595189] CPU: 0 PID: 3662 Comm: syzkaller174897 Not tainted 4.15.0-rc7+ #261 [ 25.602613] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.611945] Call Trace: [ 25.614508] dump_stack+0x194/0x257 [ 25.618115] ? arch_local_irq_restore+0x53/0x53 [ 25.622764] debug_check_no_locks_freed+0x32f/0x3c0 [ 25.627756] kmem_cache_free+0x68/0x2a0 [ 25.631719] __sk_destruct+0x622/0x910 [ 25.635586] ? kasan_slab_free+0x71/0xc0 [ 25.639621] ? sock_rfree+0x160/0x160 [ 25.643392] ? inet_sendmsg+0x11f/0x5e0 [ 25.647338] ? SYSC_sendto+0x361/0x5c0 [ 25.651197] ? SyS_sendto+0x40/0x50 [ 25.654798] ? entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.659703] ? check_noncircular+0x20/0x20 [ 25.663918] ? print_irqtrace_events+0x270/0x270 [ 25.668647] ? free_obj_work+0x690/0x690 [ 25.672686] ? sctp_put_port+0x495/0x640 [ 25.676728] ? sctp_poll+0xc00/0xc00 [ 25.680419] ? refcount_sub_and_test+0x115/0x1b0 [ 25.685239] ? refcount_inc+0x50/0x50 [ 25.689024] ? refcount_inc+0x50/0x50 [ 25.692799] sk_destruct+0x47/0x80 [ 25.696317] __sk_free+0x57/0x230 [ 25.699750] sk_free+0x2a/0x40 [ 25.702923] sctp_association_put+0x14c/0x2f0 [ 25.707390] ? sctp_association_hold+0x20/0x20 [ 25.711944] ? lock_sock_nested+0x91/0x110 [ 25.716153] ? trace_hardirqs_on+0xd/0x10 [ 25.720291] ? __local_bh_enable_ip+0x121/0x230 [ 25.724937] sctp_wait_for_sndbuf+0x673/0x8d0 [ 25.729417] ? sctp_init_sock+0x13b0/0x13b0 [ 25.733724] ? do_raw_spin_trylock+0x190/0x190 [ 25.738286] ? __local_bh_enable_ip+0x121/0x230 [ 25.742932] ? sctp_prsctp_prune+0x97/0x6f0 [ 25.747234] ? prepare_to_wait+0x4d0/0x4d0 [ 25.751441] ? trace_hardirqs_on+0xd/0x10 [ 25.755567] sctp_sendmsg+0x277d/0x3360 [ 25.759516] ? put_pi_state+0x3c0/0x560 [ 25.763468] ? sctp_id2assoc+0x390/0x390 [ 25.767502] ? avc_has_perm+0x43e/0x680 [ 25.771458] ? avc_has_perm_noaudit+0x520/0x520 [ 25.776108] ? __fget+0x35c/0x570 [ 25.779975] ? iterate_fd+0x3f0/0x3f0 [ 25.783753] ? find_held_lock+0x35/0x1d0 [ 25.787793] ? sock_has_perm+0x2a4/0x420 [ 25.791829] ? lock_release+0x962/0xa40 [ 25.795775] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.801634] ? __check_object_size+0x25d/0x4f0 [ 25.806203] inet_sendmsg+0x11f/0x5e0 [ 25.809976] ? inet_sendmsg+0x11f/0x5e0 [ 25.813929] ? __might_sleep+0x95/0x190 [ 25.817876] ? inet_recvmsg+0x5f0/0x5f0 [ 25.821823] ? selinux_socket_sendmsg+0x36/0x40 [ 25.826464] ? security_socket_sendmsg+0x89/0xb0 [ 25.831191] ? inet_recvmsg+0x5f0/0x5f0 [ 25.835138] sock_sendmsg+0xca/0x110 [ 25.838831] SYSC_sendto+0x361/0x5c0 [ 25.842523] ? SYSC_connect+0x4a0/0x4a0 [ 25.846474] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 25.851813] ? __do_page_fault+0x3d6/0xc90 [ 25.856028] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.861292] ? SyS_futex+0x269/0x390 [ 25.864978] ? SyS_setsockopt+0x215/0x360 [ 25.869102] ? do_futex+0x22a0/0x22a0 [ 25.872882] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.877711] SyS_sendto+0x40/0x50 [ 25.881140] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.885869] RIP: 0033:0x4457e9 [ 25.889034] RSP: 002b:00007ff8154dbda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 25.896715] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 25.903958] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 25.911210] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 25.918454] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 25.925697] R13: 00007ffe8177304f R14: 00007ff8154dc9c0 R15: 0000000000000001 [ 25.933079] ================================================================== [ 25.940432] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 25.947088] Read of size 4 at addr ffff8801d905e08c by task syzkaller174897/3662 [ 25.954592] [ 25.956206] CPU: 0 PID: 3662 Comm: syzkaller174897 Not tainted 4.15.0-rc7+ #261 [ 25.963625] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.972954] Call Trace: [ 25.975518] dump_stack+0x194/0x257 [ 25.979122] ? arch_local_irq_restore+0x53/0x53 [ 25.983772] ? show_regs_print_info+0x18/0x18 [ 25.988242] ? lock_acquire+0x1d5/0x580 executing program [ 25.992190] ? trace_hardirqs_on+0xd/0x10 [ 25.996310] ? do_raw_spin_lock+0x1e0/0x220 [ 26.000606] print_address_description+0x73/0x250 [ 26.005451] ? do_raw_spin_lock+0x1e0/0x220 [ 26.009777] kasan_report+0x25b/0x340 [ 26.013557] __asan_report_load4_noabort+0x14/0x20 [ 26.018473] do_raw_spin_lock+0x1e0/0x220 [ 26.022602] _raw_spin_lock_bh+0x39/0x40 [ 26.026637] ? release_sock+0x74/0x2a0 [ 26.030497] release_sock+0x74/0x2a0 [ 26.034185] ? sctp_prsctp_prune+0x97/0x6f0 [ 26.038488] ? __release_sock+0x360/0x360 [ 26.042612] ? trace_hardirqs_on+0xd/0x10 [ 26.046736] sctp_sendmsg+0x2c61/0x3360 [ 26.050693] ? put_pi_state+0x3c0/0x560 [ 26.054645] ? sctp_id2assoc+0x390/0x390 [ 26.058681] ? avc_has_perm+0x43e/0x680 [ 26.062629] ? avc_has_perm_noaudit+0x520/0x520 [ 26.067271] ? __fget+0x35c/0x570 [ 26.070700] ? iterate_fd+0x3f0/0x3f0 [ 26.074480] ? find_held_lock+0x35/0x1d0 [ 26.078520] ? sock_has_perm+0x2a4/0x420 [ 26.082559] ? lock_release+0x962/0xa40 [ 26.086511] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.092384] ? __check_object_size+0x25d/0x4f0 [ 26.096943] inet_sendmsg+0x11f/0x5e0 [ 26.100715] ? inet_sendmsg+0x11f/0x5e0 [ 26.104660] ? __might_sleep+0x95/0x190 [ 26.108608] ? inet_recvmsg+0x5f0/0x5f0 [ 26.112562] ? selinux_socket_sendmsg+0x36/0x40 [ 26.117207] ? security_socket_sendmsg+0x89/0xb0 [ 26.121936] ? inet_recvmsg+0x5f0/0x5f0 [ 26.125886] sock_sendmsg+0xca/0x110 [ 26.129576] SYSC_sendto+0x361/0x5c0 [ 26.133265] ? SYSC_connect+0x4a0/0x4a0 [ 26.137228] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 26.142566] ? __do_page_fault+0x3d6/0xc90 [ 26.146778] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 26.152043] ? SyS_futex+0x269/0x390 [ 26.155734] ? SyS_setsockopt+0x215/0x360 [ 26.159856] ? do_futex+0x22a0/0x22a0 [ 26.163635] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 26.168454] SyS_sendto+0x40/0x50 [ 26.171884] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.176613] RIP: 0033:0x4457e9 [ 26.179775] RSP: 002b:00007ff8154dbda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.187457] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 26.194699] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 26.201948] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 26.209190] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.216436] R13: 00007ffe8177304f R14: 00007ff8154dc9c0 R15: 0000000000000001 [ 26.223692] [ 26.225292] Allocated by task 3667: [ 26.228897] save_stack+0x43/0xd0 [ 26.232339] kasan_kmalloc+0xad/0xe0 [ 26.236024] kasan_slab_alloc+0x12/0x20 [ 26.239980] kmem_cache_alloc+0x12e/0x760 [ 26.244099] sk_prot_alloc+0x65/0x2a0 [ 26.247872] sk_alloc+0x105/0x1410 [ 26.251386] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 26.256198] sctp_accept+0x5c4/0x970 [ 26.259884] inet_accept+0x12c/0x930 [ 26.263570] SYSC_accept4+0x38d/0x870 [ 26.267343] SyS_accept+0x26/0x30 [ 26.270772] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.275496] [ 26.277099] Freed by task 3662: [ 26.280360] save_stack+0x43/0xd0 [ 26.283787] kasan_slab_free+0x71/0xc0 [ 26.287645] kmem_cache_free+0x83/0x2a0 [ 26.291589] __sk_destruct+0x622/0x910 [ 26.295446] sk_destruct+0x47/0x80 [ 26.298960] __sk_free+0x57/0x230 [ 26.302385] sk_free+0x2a/0x40 [ 26.305550] sctp_association_put+0x14c/0x2f0 [ 26.310016] sctp_wait_for_sndbuf+0x673/0x8d0 [ 26.314493] sctp_sendmsg+0x277d/0x3360 [ 26.318438] inet_sendmsg+0x11f/0x5e0 [ 26.322208] sock_sendmsg+0xca/0x110 [ 26.325894] SYSC_sendto+0x361/0x5c0 [ 26.329578] SyS_sendto+0x40/0x50 [ 26.333010] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.337735] [ 26.339337] The buggy address belongs to the object at ffff8801d905e000 [ 26.339337] which belongs to the cache SCTPv6 of size 1888 [ 26.351618] The buggy address is located 140 bytes inside of [ 26.351618] 1888-byte region [ffff8801d905e000, ffff8801d905e760) [ 26.363557] The buggy address belongs to the page: [ 26.368459] page:ffffea0007641780 count:1 mapcount:0 mapping:ffff8801d905e000 index:0x0 [ 26.376574] flags: 0x2fffc0000000100(slab) [ 26.380790] raw: 02fffc0000000100 ffff8801d905e000 0000000000000000 0000000100000002 [ 26.388652] raw: ffffea00074b1c20 ffffea000754b6e0 ffff8801d2c669c0 0000000000000000 [ 26.396502] page dumped because: kasan: bad access detected [ 26.402180] [ 26.403779] Memory state around the buggy address: [ 26.408681] ffff8801d905df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.416015] ffff8801d905e000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.423348] >ffff8801d905e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.430678] ^ [ 26.434278] ffff8801d905e100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.441610] ffff8801d905e180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.448949] ================================================================== [ 26.456321] Kernel panic - not syncing: panic_on_warn set ... [ 26.456321] [ 26.463683] CPU: 0 PID: 3662 Comm: syzkaller174897 Tainted: G B 4.15.0-rc7+ #261 [ 26.472422] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.481761] Call Trace: [ 26.484345] dump_stack+0x194/0x257 [ 26.487966] ? arch_local_irq_restore+0x53/0x53 executing program [ 26.492610] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.497339] ? vsnprintf+0x1ed/0x1900 [ 26.501112] ? do_raw_spin_lock+0x100/0x220 [ 26.505418] panic+0x1e4/0x41c [ 26.508607] ? refcount_error_report+0x214/0x214 [ 26.513337] ? add_taint+0x1c/0x50 [ 26.516861] ? add_taint+0x1c/0x50 [ 26.520384] ? do_raw_spin_lock+0x1e0/0x220 [ 26.524691] kasan_end_report+0x50/0x50 [ 26.528651] kasan_report+0x144/0x340 [ 26.532434] __asan_report_load4_noabort+0x14/0x20 [ 26.537341] do_raw_spin_lock+0x1e0/0x220 [ 26.541472] _raw_spin_lock_bh+0x39/0x40 [ 26.545511] ? release_sock+0x74/0x2a0 [ 26.549375] release_sock+0x74/0x2a0 [ 26.553065] ? sctp_prsctp_prune+0x97/0x6f0 [ 26.557367] ? __release_sock+0x360/0x360 [ 26.561497] ? trace_hardirqs_on+0xd/0x10 [ 26.565622] sctp_sendmsg+0x2c61/0x3360 [ 26.569586] ? put_pi_state+0x3c0/0x560 [ 26.573539] ? sctp_id2assoc+0x390/0x390 [ 26.577574] ? avc_has_perm+0x43e/0x680 [ 26.581533] ? avc_has_perm_noaudit+0x520/0x520 [ 26.586178] ? __fget+0x35c/0x570 [ 26.589609] ? iterate_fd+0x3f0/0x3f0 [ 26.593388] ? find_held_lock+0x35/0x1d0 [ 26.597430] ? sock_has_perm+0x2a4/0x420 [ 26.601468] ? lock_release+0x962/0xa40 [ 26.605416] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 26.611275] ? __check_object_size+0x25d/0x4f0 [ 26.615834] inet_sendmsg+0x11f/0x5e0 [ 26.619615] ? inet_sendmsg+0x11f/0x5e0 [ 26.623561] ? __might_sleep+0x95/0x190 [ 26.627508] ? inet_recvmsg+0x5f0/0x5f0 [ 26.631460] ? selinux_socket_sendmsg+0x36/0x40 [ 26.636113] ? security_socket_sendmsg+0x89/0xb0 [ 26.640843] ? inet_recvmsg+0x5f0/0x5f0 [ 26.644794] sock_sendmsg+0xca/0x110 [ 26.648483] SYSC_sendto+0x361/0x5c0 [ 26.652173] ? SYSC_connect+0x4a0/0x4a0 [ 26.656131] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 26.661467] ? __do_page_fault+0x3d6/0xc90 [ 26.665681] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 26.670953] ? SyS_futex+0x269/0x390 [ 26.674642] ? SyS_setsockopt+0x215/0x360 [ 26.678766] ? do_futex+0x22a0/0x22a0 [ 26.682543] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 26.687364] SyS_sendto+0x40/0x50 [ 26.690794] entry_SYSCALL_64_fastpath+0x23/0x9a [ 26.695519] RIP: 0033:0x4457e9 [ 26.698684] RSP: 002b:00007ff8154dbda8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 26.706364] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 26.713607] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 26.720851] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 26.728107] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 26.735360] R13: 00007ffe8177304f R14: 00007ff8154dc9c0 R15: 0000000000000001 [ 26.743097] Dumping ftrace buffer: [ 26.746611] (ftrace buffer empty) [ 26.750294] Kernel Offset: disabled [ 26.753892] Rebooting in 86400 seconds..