[....] Starting enhanced syslogd: rsyslogd[ 12.717373] audit: type=1400 audit(1515908104.317:5): avc: denied { syslog } for pid=3499 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 19.252700] audit: type=1400 audit(1515908110.852:6): avc: denied { map } for pid=3638 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.245' (ECDSA) to the list of known hosts. executing program [ 27.301677] audit: type=1400 audit(1515908118.901:7): avc: denied { map } for pid=3653 comm="syzkaller035369" path="/root/syzkaller035369353" 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 [ 27.489907] [ 27.491600] ========================= [ 27.495392] WARNING: held lock freed! [ 27.499172] 4.15.0-rc7+ #261 Not tainted [ 27.503203] ------------------------- [ 27.506976] syzkaller035369/3657 is freeing memory 00000000a06ed62f-000000003445c987, with a lock still held there! [ 27.517523] (sk_lock-AF_INET6){+.+.}, at: [<000000000b6a9f4f>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 27.526453] 1 lock held by syzkaller035369/3657: [ 27.531201] #0: (sk_lock-AF_INET6){+.+.}, at: [<000000000b6a9f4f>] sctp_wait_for_sndbuf+0x509/0x8d0 [ 27.540564] [ 27.540564] stack backtrace: [ 27.545059] CPU: 1 PID: 3657 Comm: syzkaller035369 Not tainted 4.15.0-rc7+ #261 [ 27.552489] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.561839] Call Trace: [ 27.564448] dump_stack+0x194/0x257 [ 27.568072] ? arch_local_irq_restore+0x53/0x53 [ 27.572758] debug_check_no_locks_freed+0x32f/0x3c0 [ 27.577771] kmem_cache_free+0x68/0x2a0 [ 27.581735] __sk_destruct+0x622/0x910 [ 27.585597] ? kasan_slab_free+0x71/0xc0 [ 27.589629] ? sock_rfree+0x160/0x160 [ 27.593407] ? inet_sendmsg+0x11f/0x5e0 [ 27.597352] ? SYSC_sendto+0x361/0x5c0 [ 27.601225] ? SyS_sendto+0x40/0x50 [ 27.604843] ? entry_SYSCALL_64_fastpath+0x23/0x9a [ 27.609760] ? check_noncircular+0x20/0x20 [ 27.614066] ? print_irqtrace_events+0x270/0x270 [ 27.618798] ? free_obj_work+0x690/0x690 [ 27.622859] ? sctp_put_port+0x495/0x640 [ 27.626901] ? sctp_poll+0xc00/0xc00 [ 27.630619] ? refcount_sub_and_test+0x115/0x1b0 [ 27.635382] ? refcount_inc+0x50/0x50 [ 27.639187] ? refcount_inc+0x50/0x50 [ 27.642993] sk_destruct+0x47/0x80 [ 27.646538] __sk_free+0x57/0x230 [ 27.649995] sk_free+0x2a/0x40 [ 27.653181] sctp_association_put+0x14c/0x2f0 [ 27.658040] ? sctp_association_hold+0x20/0x20 [ 27.662597] ? lock_sock_nested+0x91/0x110 [ 27.666813] ? trace_hardirqs_on+0xd/0x10 [ 27.670940] ? __local_bh_enable_ip+0x121/0x230 [ 27.675582] sctp_wait_for_sndbuf+0x673/0x8d0 [ 27.680052] ? sctp_init_sock+0x13b0/0x13b0 [ 27.684345] ? do_raw_spin_trylock+0x190/0x190 [ 27.688914] ? __local_bh_enable_ip+0x121/0x230 [ 27.693583] ? sctp_prsctp_prune+0x97/0x6f0 [ 27.697886] ? prepare_to_wait+0x4d0/0x4d0 [ 27.702097] ? trace_hardirqs_on+0xd/0x10 [ 27.706243] sctp_sendmsg+0x277d/0x3360 [ 27.710221] ? put_pi_state+0x3c0/0x560 [ 27.714207] ? sctp_id2assoc+0x390/0x390 [ 27.718263] ? avc_has_perm+0x43e/0x680 [ 27.722210] ? avc_has_perm_noaudit+0x520/0x520 [ 27.726852] ? __fget+0x35c/0x570 [ 27.730314] ? iterate_fd+0x3f0/0x3f0 [ 27.734115] ? find_held_lock+0x35/0x1d0 [ 27.738177] ? sock_has_perm+0x2a4/0x420 [ 27.742215] ? lock_release+0x962/0xa40 [ 27.746173] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 27.752054] ? __check_object_size+0x25d/0x4f0 [ 27.756652] inet_sendmsg+0x11f/0x5e0 [ 27.760441] ? inet_sendmsg+0x11f/0x5e0 [ 27.764402] ? __might_sleep+0x95/0x190 [ 27.768373] ? inet_recvmsg+0x5f0/0x5f0 [ 27.772335] ? selinux_socket_sendmsg+0x36/0x40 [ 27.777101] ? security_socket_sendmsg+0x89/0xb0 [ 27.781857] ? inet_recvmsg+0x5f0/0x5f0 [ 27.785823] sock_sendmsg+0xca/0x110 [ 27.789595] SYSC_sendto+0x361/0x5c0 [ 27.793276] ? SYSC_connect+0x4a0/0x4a0 [ 27.797232] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 27.802572] ? __do_page_fault+0x3d6/0xc90 [ 27.806804] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 27.812095] ? SyS_futex+0x269/0x390 [ 27.815803] ? SyS_setsockopt+0x215/0x360 [ 27.819948] ? do_futex+0x22a0/0x22a0 [ 27.823725] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 27.828540] SyS_sendto+0x40/0x50 [ 27.831966] entry_SYSCALL_64_fastpath+0x23/0x9a [ 27.836703] RIP: 0033:0x4457e9 [ 27.839863] RSP: 002b:00007f784a603da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 27.847537] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 27.854775] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 27.862025] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 27.869371] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 27.876634] R13: 00007ffc672feeff R14: 00007f784a6049c0 R15: 0000000000000001 [ 27.884033] ================================================================== [ 27.891649] BUG: KASAN: use-after-free in do_raw_spin_lock+0x1e0/0x220 [ 27.898294] Read of size 4 at addr ffff8801d9b6c08c by task syzkaller035369/3657 [ 27.905799] [ 27.907406] CPU: 1 PID: 3657 Comm: syzkaller035369 Not tainted 4.15.0-rc7+ #261 [ 27.914819] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.924155] Call Trace: [ 27.926725] dump_stack+0x194/0x257 [ 27.930324] ? arch_local_irq_restore+0x53/0x53 [ 27.934970] ? show_regs_print_info+0x18/0x18 executing program [ 27.939533] ? lock_acquire+0x1d5/0x580 [ 27.943496] ? trace_hardirqs_on+0xd/0x10 [ 27.947635] ? do_raw_spin_lock+0x1e0/0x220 [ 27.951946] print_address_description+0x73/0x250 [ 27.956769] ? do_raw_spin_lock+0x1e0/0x220 [ 27.961087] kasan_report+0x25b/0x340 [ 27.964889] __asan_report_load4_noabort+0x14/0x20 [ 27.969818] do_raw_spin_lock+0x1e0/0x220 [ 27.973976] _raw_spin_lock_bh+0x39/0x40 [ 27.978043] ? release_sock+0x74/0x2a0 [ 27.981937] release_sock+0x74/0x2a0 [ 27.985650] ? sctp_prsctp_prune+0x97/0x6f0 [ 27.989960] ? __release_sock+0x360/0x360 [ 27.994106] ? trace_hardirqs_on+0xd/0x10 [ 27.998264] sctp_sendmsg+0x2c61/0x3360 [ 28.002241] ? put_pi_state+0x3c0/0x560 [ 28.006224] ? sctp_id2assoc+0x390/0x390 [ 28.010290] ? avc_has_perm+0x43e/0x680 [ 28.014273] ? avc_has_perm_noaudit+0x520/0x520 [ 28.018957] ? __fget+0x35c/0x570 [ 28.022419] ? iterate_fd+0x3f0/0x3f0 [ 28.026228] ? find_held_lock+0x35/0x1d0 [ 28.030300] ? sock_has_perm+0x2a4/0x420 [ 28.034388] ? lock_release+0x962/0xa40 [ 28.038356] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.044233] ? __check_object_size+0x25d/0x4f0 [ 28.048810] inet_sendmsg+0x11f/0x5e0 [ 28.052624] ? inet_sendmsg+0x11f/0x5e0 [ 28.056606] ? __might_sleep+0x95/0x190 [ 28.060659] ? inet_recvmsg+0x5f0/0x5f0 [ 28.064620] ? selinux_socket_sendmsg+0x36/0x40 [ 28.069280] ? security_socket_sendmsg+0x89/0xb0 [ 28.074035] ? inet_recvmsg+0x5f0/0x5f0 [ 28.078007] sock_sendmsg+0xca/0x110 [ 28.081694] SYSC_sendto+0x361/0x5c0 [ 28.085403] ? SYSC_connect+0x4a0/0x4a0 [ 28.089400] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 28.094754] ? __do_page_fault+0x3d6/0xc90 [ 28.098992] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.104279] ? SyS_futex+0x269/0x390 [ 28.107990] ? SyS_setsockopt+0x215/0x360 [ 28.112152] ? do_futex+0x22a0/0x22a0 [ 28.115963] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 28.120804] SyS_sendto+0x40/0x50 [ 28.124270] entry_SYSCALL_64_fastpath+0x23/0x9a [ 28.129033] RIP: 0033:0x4457e9 [ 28.132195] RSP: 002b:00007f784a603da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 28.139879] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 28.147139] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 28.154396] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 28.161654] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 28.168914] R13: 00007ffc672feeff R14: 00007f784a6049c0 R15: 0000000000000001 [ 28.176190] [ 28.177810] Allocated by task 3662: [ 28.181433] save_stack+0x43/0xd0 [ 28.184879] kasan_kmalloc+0xad/0xe0 [ 28.188588] kasan_slab_alloc+0x12/0x20 [ 28.192546] kmem_cache_alloc+0x12e/0x760 [ 28.196684] sk_prot_alloc+0x65/0x2a0 [ 28.200495] sk_alloc+0x105/0x1410 [ 28.204028] sctp_v6_create_accept_sk+0x15a/0x9b0 [ 28.208891] sctp_accept+0x5c4/0x970 [ 28.212613] inet_accept+0x12c/0x930 [ 28.216348] SYSC_accept4+0x38d/0x870 [ 28.220155] SyS_accept+0x26/0x30 [ 28.223613] entry_SYSCALL_64_fastpath+0x23/0x9a [ 28.228349] [ 28.229964] Freed by task 3657: [ 28.233238] save_stack+0x43/0xd0 [ 28.236680] kasan_slab_free+0x71/0xc0 [ 28.240582] kmem_cache_free+0x83/0x2a0 [ 28.244558] __sk_destruct+0x622/0x910 [ 28.248434] sk_destruct+0x47/0x80 [ 28.251960] __sk_free+0x57/0x230 [ 28.255405] sk_free+0x2a/0x40 [ 28.258593] sctp_association_put+0x14c/0x2f0 [ 28.263085] sctp_wait_for_sndbuf+0x673/0x8d0 [ 28.267578] sctp_sendmsg+0x277d/0x3360 [ 28.271540] inet_sendmsg+0x11f/0x5e0 [ 28.275341] sock_sendmsg+0xca/0x110 [ 28.279055] SYSC_sendto+0x361/0x5c0 [ 28.282765] SyS_sendto+0x40/0x50 [ 28.286208] entry_SYSCALL_64_fastpath+0x23/0x9a [ 28.290944] [ 28.292554] The buggy address belongs to the object at ffff8801d9b6c000 [ 28.292554] which belongs to the cache SCTPv6 of size 1888 [ 28.304865] The buggy address is located 140 bytes inside of [ 28.304865] 1888-byte region [ffff8801d9b6c000, ffff8801d9b6c760) [ 28.316819] The buggy address belongs to the page: [ 28.321738] page:ffffea000766db00 count:1 mapcount:0 mapping:ffff8801d9b6c000 index:0x0 [ 28.329885] flags: 0x2fffc0000000100(slab) [ 28.334127] raw: 02fffc0000000100 ffff8801d9b6c000 0000000000000000 0000000100000002 [ 28.342602] raw: ffffea00074cee60 ffffea000767fea0 ffff8801d33b0200 0000000000000000 [ 28.350466] page dumped because: kasan: bad access detected [ 28.356156] [ 28.357760] Memory state around the buggy address: [ 28.362666] ffff8801d9b6bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.370007] ffff8801d9b6c000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.377527] >ffff8801d9b6c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.384872] ^ [ 28.388490] ffff8801d9b6c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.395841] ffff8801d9b6c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.403189] ================================================================== [ 28.410574] Kernel panic - not syncing: panic_on_warn set ... [ 28.410574] [ 28.418539] CPU: 1 PID: 3657 Comm: syzkaller035369 Tainted: G B 4.15.0-rc7+ #261 [ 28.427272] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.436630] Call Trace: [ 28.439196] dump_stack+0x194/0x257 executing program [ 28.442818] ? arch_local_irq_restore+0x53/0x53 [ 28.447487] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.452239] ? vsnprintf+0x1ed/0x1900 [ 28.456018] ? do_raw_spin_lock+0x100/0x220 [ 28.460319] panic+0x1e4/0x41c [ 28.463509] ? refcount_error_report+0x214/0x214 [ 28.468244] ? add_taint+0x1c/0x50 [ 28.471758] ? add_taint+0x1c/0x50 [ 28.475271] ? do_raw_spin_lock+0x1e0/0x220 [ 28.479564] kasan_end_report+0x50/0x50 [ 28.484421] kasan_report+0x144/0x340 [ 28.488211] __asan_report_load4_noabort+0x14/0x20 [ 28.493118] do_raw_spin_lock+0x1e0/0x220 [ 28.497258] _raw_spin_lock_bh+0x39/0x40 [ 28.501342] ? release_sock+0x74/0x2a0 [ 28.505224] release_sock+0x74/0x2a0 [ 28.508929] ? sctp_prsctp_prune+0x97/0x6f0 [ 28.513237] ? __release_sock+0x360/0x360 [ 28.517368] ? trace_hardirqs_on+0xd/0x10 [ 28.521511] sctp_sendmsg+0x2c61/0x3360 [ 28.525476] ? put_pi_state+0x3c0/0x560 [ 28.529446] ? sctp_id2assoc+0x390/0x390 [ 28.533506] ? avc_has_perm+0x43e/0x680 [ 28.537583] ? avc_has_perm_noaudit+0x520/0x520 [ 28.542242] ? __fget+0x35c/0x570 [ 28.545688] ? iterate_fd+0x3f0/0x3f0 [ 28.549483] ? find_held_lock+0x35/0x1d0 [ 28.553540] ? sock_has_perm+0x2a4/0x420 [ 28.557606] ? lock_release+0x962/0xa40 [ 28.561571] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.567458] ? __check_object_size+0x25d/0x4f0 [ 28.572045] inet_sendmsg+0x11f/0x5e0 [ 28.575852] ? inet_sendmsg+0x11f/0x5e0 [ 28.579854] ? __might_sleep+0x95/0x190 [ 28.583830] ? inet_recvmsg+0x5f0/0x5f0 [ 28.587811] ? selinux_socket_sendmsg+0x36/0x40 [ 28.592485] ? security_socket_sendmsg+0x89/0xb0 [ 28.597236] ? inet_recvmsg+0x5f0/0x5f0 [ 28.601216] sock_sendmsg+0xca/0x110 [ 28.604931] SYSC_sendto+0x361/0x5c0 [ 28.608646] ? SYSC_connect+0x4a0/0x4a0 [ 28.612621] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 28.617981] ? __do_page_fault+0x3d6/0xc90 [ 28.622217] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.627497] ? SyS_futex+0x269/0x390 [ 28.631204] ? SyS_setsockopt+0x215/0x360 [ 28.635350] ? do_futex+0x22a0/0x22a0 [ 28.639144] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 28.643984] SyS_sendto+0x40/0x50 [ 28.647435] entry_SYSCALL_64_fastpath+0x23/0x9a [ 28.652173] RIP: 0033:0x4457e9 [ 28.655349] RSP: 002b:00007f784a603da8 EFLAGS: 00000216 ORIG_RAX: 000000000000002c [ 28.663026] RAX: ffffffffffffffda RBX: 00000000006dac6c RCX: 00000000004457e9 [ 28.670263] RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000004 [ 28.677507] RBP: 00000000006dac68 R08: 00000000204d9000 R09: 000000000000001c [ 28.684746] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 [ 28.691987] R13: 00007ffc672feeff R14: 00007f784a6049c0 R15: 0000000000000001 [ 28.699271] Dumping ftrace buffer: [ 28.702788] (ftrace buffer empty) [ 28.706477] Kernel Offset: disabled [ 28.710086] Rebooting in 86400 seconds..