[....] Starting enhanced syslogd: rsyslogd[ 13.446106] audit: type=1400 audit(1515934768.522: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: [ 19.140220] audit: type=1400 audit(1515934774.217:6): avc: denied { map } for pid=3647 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.14' (ECDSA) to the list of known hosts. executing program [ 25.387783] audit: type=1400 audit(1515934780.464:7): avc: denied { map } for pid=3661 comm="syzkaller848862" path="/root/syzkaller848862124" 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 [ 25.393077] ================================================================== [ 25.393090] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.393094] Read of size 8 at addr ffff8801bc2e9370 by task syzkaller848862/3661 [ 25.393095] [ 25.393100] CPU: 0 PID: 3661 Comm: syzkaller848862 Not tainted 4.15.0-rc7+ #261 [ 25.393102] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.393104] Call Trace: [ 25.393112] dump_stack+0x194/0x257 [ 25.393117] ? arch_local_irq_restore+0x53/0x53 [ 25.393123] ? show_regs_print_info+0x18/0x18 [ 25.393127] ? print_irqtrace_events+0x270/0x270 [ 25.393131] ? __lock_acquire+0x664/0x3e00 [ 25.393135] ? __lock_acquire+0x3d4d/0x3e00 [ 25.393141] print_address_description+0x73/0x250 [ 25.393145] ? __lock_acquire+0x3d4d/0x3e00 [ 25.393149] kasan_report+0x25b/0x340 [ 25.393154] __asan_report_load8_noabort+0x14/0x20 [ 25.393157] __lock_acquire+0x3d4d/0x3e00 [ 25.393160] ? __lock_acquire+0x664/0x3e00 [ 25.393164] ? lock_downgrade+0x980/0x980 [ 25.393167] ? lock_downgrade+0x980/0x980 [ 25.393174] ? remove_wait_queue+0x81/0x350 [ 25.393179] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.393183] ? __lock_acquire+0x664/0x3e00 [ 25.393187] ? check_noncircular+0x20/0x20 [ 25.393195] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.393199] ? lock_acquire+0x1d5/0x580 [ 25.393202] ? lock_acquire+0x1d5/0x580 [ 25.393207] ? ep_free+0xf4/0x320 [ 25.393212] ? lock_release+0xa40/0xa40 [ 25.393217] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.393221] ? print_irqtrace_events+0x270/0x270 [ 25.393227] ? rcu_note_context_switch+0x710/0x710 [ 25.393231] ? __might_sleep+0x95/0x190 [ 25.393235] ? ep_free+0xf4/0x320 [ 25.393240] ? __mutex_lock+0x16f/0x1a80 [ 25.393243] ? ep_free+0xf4/0x320 [ 25.393248] ? print_irqtrace_events+0x270/0x270 [ 25.393251] ? ep_free+0xf4/0x320 [ 25.393256] lock_acquire+0x1d5/0x580 [ 25.393259] ? lock_acquire+0x1d5/0x580 [ 25.393262] ? remove_wait_queue+0x81/0x350 [ 25.393266] ? __lock_acquire+0x664/0x3e00 [ 25.393271] ? lock_release+0xa40/0xa40 [ 25.393276] ? lock_acquire+0x1d5/0x580 [ 25.393279] ? lock_acquire+0x1d5/0x580 [ 25.393283] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.393290] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.393293] ? remove_wait_queue+0x81/0x350 [ 25.393297] remove_wait_queue+0x81/0x350 [ 25.393302] ? add_wait_queue+0x290/0x290 [ 25.393305] ? rcutorture_record_progress+0x10/0x10 [ 25.393312] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.393317] ? __kernel_text_address+0xd/0x40 [ 25.393322] ? clear_tfile_check_list+0x370/0x370 [ 25.393326] ? check_noncircular+0x20/0x20 [ 25.393332] ? locks_remove_file+0x3fa/0x5a0 [ 25.393338] ep_free+0x13f/0x320 [ 25.393342] ? ep_remove+0x800/0x800 [ 25.393346] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.393350] ? ep_free+0x320/0x320 [ 25.393354] ep_eventpoll_release+0x44/0x60 [ 25.393359] __fput+0x327/0x7e0 [ 25.393364] ? fput+0x140/0x140 [ 25.393368] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.393374] ____fput+0x15/0x20 [ 25.393378] task_work_run+0x199/0x270 [ 25.393382] ? task_work_cancel+0x210/0x210 [ 25.393387] ? _raw_spin_unlock+0x22/0x30 [ 25.393391] ? switch_task_namespaces+0x87/0xc0 [ 25.393396] do_exit+0x9bb/0x1ad0 [ 25.393403] ? binder_ioctl+0x571/0x1417 [ 25.393407] ? mm_update_next_owner+0x930/0x930 [ 25.393412] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.393418] ? avc_ss_reset+0x110/0x110 [ 25.393422] ? mutex_unlock+0xd/0x10 [ 25.393426] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.393438] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.393441] ? up_read+0x1a/0x40 [ 25.393445] ? rcu_note_context_switch+0x710/0x710 [ 25.393448] ? __fd_install+0x288/0x740 [ 25.393455] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.393458] ? do_vfs_ioctl+0x486/0x1520 [ 25.393461] ? _cond_resched+0x14/0x30 [ 25.393466] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.393471] ? selinux_capable+0x40/0x40 [ 25.393475] ? __alloc_fd+0x750/0x750 [ 25.393480] do_group_exit+0x149/0x400 [ 25.393484] ? SyS_exit+0x30/0x30 [ 25.393488] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.393493] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.393498] SyS_exit_group+0x1d/0x20 [ 25.393502] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.393506] RIP: 0033:0x4429f8 [ 25.393508] RSP: 002b:00007ffdacef5358 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.393512] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.393514] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.393516] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.393518] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.393520] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.393525] [ 25.393527] Allocated by task 3661: [ 25.393531] save_stack+0x43/0xd0 [ 25.393534] kasan_kmalloc+0xad/0xe0 [ 25.393537] kmem_cache_alloc_trace+0x136/0x750 [ 25.393540] binder_get_thread+0x1cf/0x870 [ 25.393544] binder_poll+0x8c/0x390 [ 25.393547] ep_item_poll.isra.10+0xec/0x320 [ 25.393550] ep_insert+0x6a3/0x1b10 [ 25.393553] SyS_epoll_ctl+0x12e4/0x1ab0 [ 25.393556] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.393557] [ 25.393558] Freed by task 3661: [ 25.393561] save_stack+0x43/0xd0 [ 25.393564] kasan_slab_free+0x71/0xc0 [ 25.393566] kfree+0xd6/0x260 [ 25.393570] binder_thread_dec_tmpref+0x27f/0x310 [ 25.393573] binder_thread_release+0x27d/0x540 [ 25.393576] binder_ioctl+0xc02/0x1417 [ 25.393579] do_vfs_ioctl+0x1b1/0x1520 [ 25.393581] SyS_ioctl+0x8f/0xc0 [ 25.393585] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.393586] [ 25.393588] The buggy address belongs to the object at ffff8801bc2e92c0 [ 25.393588] which belongs to the cache kmalloc-512 of size 512 [ 25.393591] The buggy address is located 176 bytes inside of [ 25.393591] 512-byte region [ffff8801bc2e92c0, ffff8801bc2e94c0) [ 25.393592] The buggy address belongs to the page: [ 25.393596] page:ffffea0006f0ba40 count:1 mapcount:0 mapping:ffff8801bc2e9040 index:0x0 [ 25.393599] flags: 0x2fffc0000000100(slab) [ 25.393605] raw: 02fffc0000000100 ffff8801bc2e9040 0000000000000000 0000000100000006 [ 25.393611] raw: ffffea0007662160 ffff8801dac01748 ffff8801dac00940 0000000000000000 [ 25.393612] page dumped because: kasan: bad access detected [ 25.393613] [ 25.393614] Memory state around the buggy address: [ 25.393617] ffff8801bc2e9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.393619] ffff8801bc2e9280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 25.393622] >ffff8801bc2e9300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.393623] ^ [ 25.393626] ffff8801bc2e9380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.393628] ffff8801bc2e9400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.393629] ================================================================== [ 25.393630] Disabling lock debugging due to kernel taint [ 25.393633] Kernel panic - not syncing: panic_on_warn set ... [ 25.393633] [ 25.393637] CPU: 0 PID: 3661 Comm: syzkaller848862 Tainted: G B 4.15.0-rc7+ #261 [ 25.393639] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.393640] Call Trace: [ 25.393644] dump_stack+0x194/0x257 [ 25.393649] ? arch_local_irq_restore+0x53/0x53 [ 25.393652] ? kasan_end_report+0x32/0x50 [ 25.393656] ? lock_downgrade+0x980/0x980 [ 25.393660] ? vsnprintf+0x1ed/0x1900 [ 25.393664] ? __lock_acquire+0x3cb0/0x3e00 [ 25.393667] panic+0x1e4/0x41c [ 25.393671] ? refcount_error_report+0x214/0x214 [ 25.393675] ? add_taint+0x40/0x50 [ 25.393678] ? add_taint+0x1c/0x50 [ 25.393682] ? __lock_acquire+0x3d4d/0x3e00 [ 25.393686] kasan_end_report+0x50/0x50 [ 25.393689] kasan_report+0x144/0x340 [ 25.393694] __asan_report_load8_noabort+0x14/0x20 [ 25.393698] __lock_acquire+0x3d4d/0x3e00 [ 25.393701] ? __lock_acquire+0x664/0x3e00 [ 25.393704] ? lock_downgrade+0x980/0x980 [ 25.393708] ? lock_downgrade+0x980/0x980 [ 25.393712] ? remove_wait_queue+0x81/0x350 [ 25.393717] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.393721] ? __lock_acquire+0x664/0x3e00 [ 25.393724] ? check_noncircular+0x20/0x20 [ 25.393731] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.393735] ? lock_acquire+0x1d5/0x580 [ 25.393738] ? lock_acquire+0x1d5/0x580 [ 25.393741] ? ep_free+0xf4/0x320 [ 25.393746] ? lock_release+0xa40/0xa40 [ 25.393750] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.393753] ? print_irqtrace_events+0x270/0x270 [ 25.393757] ? rcu_note_context_switch+0x710/0x710 [ 25.393761] ? __might_sleep+0x95/0x190 [ 25.393765] ? ep_free+0xf4/0x320 [ 25.393769] ? __mutex_lock+0x16f/0x1a80 [ 25.393771] ? ep_free+0xf4/0x320 [ 25.393776] ? print_irqtrace_events+0x270/0x270 [ 25.393779] ? ep_free+0xf4/0x320 [ 25.393783] lock_acquire+0x1d5/0x580 [ 25.393786] ? lock_acquire+0x1d5/0x580 [ 25.393790] ? remove_wait_queue+0x81/0x350 [ 25.393793] ? __lock_acquire+0x664/0x3e00 [ 25.393798] ? lock_release+0xa40/0xa40 [ 25.393803] ? lock_acquire+0x1d5/0x580 [ 25.393806] ? lock_acquire+0x1d5/0x580 [ 25.393810] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.393814] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.393818] ? remove_wait_queue+0x81/0x350 [ 25.393821] remove_wait_queue+0x81/0x350 [ 25.393826] ? add_wait_queue+0x290/0x290 [ 25.393829] ? rcutorture_record_progress+0x10/0x10 [ 25.393835] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.393839] ? __kernel_text_address+0xd/0x40 [ 25.393844] ? clear_tfile_check_list+0x370/0x370 [ 25.393848] ? check_noncircular+0x20/0x20 [ 25.393853] ? locks_remove_file+0x3fa/0x5a0 [ 25.393858] ep_free+0x13f/0x320 [ 25.393862] ? ep_remove+0x800/0x800 [ 25.393865] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.393870] ? ep_free+0x320/0x320 [ 25.393874] ep_eventpoll_release+0x44/0x60 [ 25.393877] __fput+0x327/0x7e0 [ 25.393882] ? fput+0x140/0x140 [ 25.393886] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.393891] ____fput+0x15/0x20 [ 25.393895] task_work_run+0x199/0x270 [ 25.393905] ? task_work_cancel+0x210/0x210 [ 25.393910] ? _raw_spin_unlock+0x22/0x30 [ 25.393913] ? switch_task_namespaces+0x87/0xc0 [ 25.393918] do_exit+0x9bb/0x1ad0 [ 25.393922] ? binder_ioctl+0x571/0x1417 [ 25.393926] ? mm_update_next_owner+0x930/0x930 [ 25.393931] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.393935] ? avc_ss_reset+0x110/0x110 [ 25.393939] ? mutex_unlock+0xd/0x10 [ 25.393942] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.393953] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.393955] ? up_read+0x1a/0x40 [ 25.393960] ? rcu_note_context_switch+0x710/0x710 [ 25.393962] ? __fd_install+0x288/0x740 [ 25.393968] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.393971] ? do_vfs_ioctl+0x486/0x1520 [ 25.393974] ? _cond_resched+0x14/0x30 [ 25.393979] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.393983] ? selinux_capable+0x40/0x40 [ 25.393987] ? __alloc_fd+0x750/0x750 [ 25.393991] do_group_exit+0x149/0x400 [ 25.393995] ? SyS_exit+0x30/0x30 [ 25.393999] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.394006] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.394011] SyS_exit_group+0x1d/0x20 [ 25.394015] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.394017] RIP: 0033:0x4429f8 [ 25.394019] RSP: 002b:00007ffdacef5358 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.394023] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.394025] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.394027] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.394028] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.394030] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.414034] Dumping ftrace buffer: [ 25.414037] (ftrace buffer empty) [ 25.414039] Kernel Offset: disabled [ 26.540744] Rebooting in 86400 seconds..