[....] Starting enhanced syslogd: rsyslogd[?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. [ 18.386522] audit: type=1400 audit(1517263260.418:6): avc: denied { map } for pid=4147 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.204' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.723489] audit: type=1400 audit(1517263266.755:7): avc: denied { map } for pid=4161 comm="syzkaller291041" path="/root/syzkaller291041019" 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 [ 24.729510] ================================================================== [ 24.729525] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 24.729531] Read of size 8 at addr ffff8801b1e8caf0 by task syzkaller291041/4161 [ 24.729532] [ 24.729539] CPU: 1 PID: 4161 Comm: syzkaller291041 Not tainted 4.15.0+ #285 [ 24.729542] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.729545] Call Trace: [ 24.729554] dump_stack+0x194/0x257 [ 24.729561] ? arch_local_irq_restore+0x53/0x53 [ 24.729569] ? show_regs_print_info+0x18/0x18 [ 24.729574] ? print_irqtrace_events+0x270/0x270 [ 24.729581] ? __lock_acquire+0x664/0x3e00 [ 24.729587] ? __lock_acquire+0x3d4d/0x3e00 [ 24.729596] print_address_description+0x73/0x250 [ 24.729602] ? __lock_acquire+0x3d4d/0x3e00 [ 24.729608] kasan_report+0x25b/0x340 [ 24.729617] __asan_report_load8_noabort+0x14/0x20 [ 24.729622] __lock_acquire+0x3d4d/0x3e00 [ 24.729628] ? __lock_acquire+0x664/0x3e00 [ 24.729634] ? lock_downgrade+0x980/0x980 [ 24.729639] ? lock_downgrade+0x980/0x980 [ 24.729648] ? remove_wait_queue+0x81/0x350 [ 24.729657] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.729664] ? __lock_acquire+0x664/0x3e00 [ 24.729669] ? check_noncircular+0x20/0x20 [ 24.729682] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.729689] ? lock_acquire+0x1d5/0x580 [ 24.729695] ? lock_acquire+0x1d5/0x580 [ 24.729702] ? ep_free+0xf4/0x320 [ 24.729710] ? lock_release+0xa40/0xa40 [ 24.729717] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.729723] ? print_irqtrace_events+0x270/0x270 [ 24.729731] ? rcu_note_context_switch+0x710/0x710 [ 24.729739] ? __might_sleep+0x95/0x190 [ 24.729745] ? ep_free+0xf4/0x320 [ 24.729752] ? __mutex_lock+0x16f/0x1a80 [ 24.729757] ? ep_free+0xf4/0x320 [ 24.729764] ? print_irqtrace_events+0x270/0x270 [ 24.729769] ? ep_free+0xf4/0x320 [ 24.729778] lock_acquire+0x1d5/0x580 [ 24.729783] ? lock_acquire+0x1d5/0x580 [ 24.729788] ? remove_wait_queue+0x81/0x350 [ 24.729794] ? __lock_acquire+0x664/0x3e00 [ 24.729802] ? lock_release+0xa40/0xa40 [ 24.729811] ? lock_acquire+0x1d5/0x580 [ 24.729816] ? lock_acquire+0x1d5/0x580 [ 24.729823] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.729831] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.729836] ? remove_wait_queue+0x81/0x350 [ 24.729848] remove_wait_queue+0x81/0x350 [ 24.729856] ? add_wait_queue+0x290/0x290 [ 24.729862] ? rcutorture_record_progress+0x10/0x10 [ 24.729872] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.729880] ? __kernel_text_address+0xd/0x40 [ 24.729888] ? clear_tfile_check_list+0x370/0x370 [ 24.729896] ? check_noncircular+0x20/0x20 [ 24.729906] ? locks_remove_file+0x3fa/0x5a0 [ 24.729916] ep_free+0x13f/0x320 [ 24.729922] ? ep_remove+0x800/0x800 [ 24.729927] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.729935] ? ep_free+0x320/0x320 [ 24.729941] ep_eventpoll_release+0x44/0x60 [ 24.729950] __fput+0x327/0x7e0 [ 24.729958] ? fput+0x140/0x140 [ 24.729965] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.729973] ____fput+0x15/0x20 [ 24.729980] task_work_run+0x199/0x270 [ 24.729988] ? task_work_cancel+0x210/0x210 [ 24.729994] ? _raw_spin_unlock+0x22/0x30 [ 24.730005] ? switch_task_namespaces+0x87/0xc0 [ 24.730014] do_exit+0x9bb/0x1ad0 [ 24.730022] ? binder_ioctl+0x4c1/0x1417 [ 24.730029] ? mm_update_next_owner+0x930/0x930 [ 24.730036] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.730046] ? avc_ss_reset+0x110/0x110 [ 24.730052] ? mutex_unlock+0xd/0x10 [ 24.730058] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.730077] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.730082] ? up_read+0x1a/0x40 [ 24.730089] ? rcu_note_context_switch+0x710/0x710 [ 24.730094] ? __fd_install+0x288/0x740 [ 24.730102] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.730108] ? do_vfs_ioctl+0x486/0x1520 [ 24.730113] ? _cond_resched+0x14/0x30 [ 24.730121] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.730128] ? selinux_capable+0x40/0x40 [ 24.730134] ? __alloc_fd+0x750/0x750 [ 24.730143] do_group_exit+0x149/0x400 [ 24.730150] ? SyS_exit+0x30/0x30 [ 24.730156] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.730164] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.730172] SyS_exit_group+0x1d/0x20 [ 24.730179] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.730183] RIP: 0033:0x4429f8 [ 24.730186] RSP: 002b:00007fff50206d68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.730193] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.730196] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.730200] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.730203] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.730207] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.730215] [ 24.730218] Allocated by task 4161: [ 24.730224] save_stack+0x43/0xd0 [ 24.730229] kasan_kmalloc+0xad/0xe0 [ 24.730234] kmem_cache_alloc_trace+0x136/0x750 [ 24.730238] binder_get_thread+0x1cf/0x870 [ 24.730242] binder_poll+0x8c/0x390 [ 24.730247] ep_item_poll.isra.10+0xec/0x320 [ 24.730252] ep_insert+0x6a3/0x1b10 [ 24.730257] SyS_epoll_ctl+0x12e4/0x1ab0 [ 24.730262] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.730263] [ 24.730265] Freed by task 4161: [ 24.730270] save_stack+0x43/0xd0 [ 24.730275] kasan_slab_free+0x71/0xc0 [ 24.730279] kfree+0xd6/0x260 [ 24.730285] binder_thread_dec_tmpref+0x27f/0x310 [ 24.730290] binder_thread_release+0x27d/0x540 [ 24.730294] binder_ioctl+0xc02/0x1417 [ 24.730299] do_vfs_ioctl+0x1b1/0x1520 [ 24.730303] SyS_ioctl+0x8f/0xc0 [ 24.730308] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.730309] [ 24.730314] The buggy address belongs to the object at ffff8801b1e8ca40 [ 24.730314] which belongs to the cache kmalloc-512 of size 512 [ 24.730319] The buggy address is located 176 bytes inside of [ 24.730319] 512-byte region [ffff8801b1e8ca40, ffff8801b1e8cc40) [ 24.730320] The buggy address belongs to the page: [ 24.730325] page:ffffea0006c7a300 count:1 mapcount:0 mapping:ffff8801b1e8c040 index:0x0 [ 24.730331] flags: 0x2fffc0000000100(slab) [ 24.730339] raw: 02fffc0000000100 ffff8801b1e8c040 0000000000000000 0000000100000006 [ 24.730346] raw: ffffea0006c96b20 ffffea0006c48ee0 ffff8801db000940 0000000000000000 [ 24.730348] page dumped because: kasan: bad access detected [ 24.730349] [ 24.730351] Memory state around the buggy address: [ 24.730356] ffff8801b1e8c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.730360] ffff8801b1e8ca00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 24.730364] >ffff8801b1e8ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.730367] ^ [ 24.730371] ffff8801b1e8cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.730375] ffff8801b1e8cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.730377] ================================================================== [ 24.730378] Disabling lock debugging due to kernel taint [ 24.730382] Kernel panic - not syncing: panic_on_warn set ... [ 24.730382] [ 24.730388] CPU: 1 PID: 4161 Comm: syzkaller291041 Tainted: G B 4.15.0+ #285 [ 24.730391] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.730392] Call Trace: [ 24.730398] dump_stack+0x194/0x257 [ 24.730405] ? arch_local_irq_restore+0x53/0x53 [ 24.730411] ? kasan_end_report+0x32/0x50 [ 24.730417] ? lock_downgrade+0x980/0x980 [ 24.730423] ? vsnprintf+0x1ed/0x1900 [ 24.730429] ? __lock_acquire+0x3cd0/0x3e00 [ 24.730435] panic+0x1e4/0x41c [ 24.730441] ? refcount_error_report+0x214/0x214 [ 24.730448] ? add_taint+0x40/0x50 [ 24.730453] ? add_taint+0x1c/0x50 [ 24.730460] ? __lock_acquire+0x3d4d/0x3e00 [ 24.730466] kasan_end_report+0x50/0x50 [ 24.730471] kasan_report+0x144/0x340 [ 24.730479] __asan_report_load8_noabort+0x14/0x20 [ 24.730485] __lock_acquire+0x3d4d/0x3e00 [ 24.730490] ? __lock_acquire+0x664/0x3e00 [ 24.730496] ? lock_downgrade+0x980/0x980 [ 24.730501] ? lock_downgrade+0x980/0x980 [ 24.730508] ? remove_wait_queue+0x81/0x350 [ 24.730517] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.730524] ? __lock_acquire+0x664/0x3e00 [ 24.730529] ? check_noncircular+0x20/0x20 [ 24.730541] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.730548] ? lock_acquire+0x1d5/0x580 [ 24.730553] ? lock_acquire+0x1d5/0x580 [ 24.730559] ? ep_free+0xf4/0x320 [ 24.730567] ? lock_release+0xa40/0xa40 [ 24.730573] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.730579] ? print_irqtrace_events+0x270/0x270 [ 24.730585] ? rcu_note_context_switch+0x710/0x710 [ 24.730592] ? __might_sleep+0x95/0x190 [ 24.730598] ? ep_free+0xf4/0x320 [ 24.730604] ? __mutex_lock+0x16f/0x1a80 [ 24.730609] ? ep_free+0xf4/0x320 [ 24.730616] ? print_irqtrace_events+0x270/0x270 [ 24.730621] ? ep_free+0xf4/0x320 [ 24.730629] lock_acquire+0x1d5/0x580 [ 24.730634] ? lock_acquire+0x1d5/0x580 [ 24.730640] ? remove_wait_queue+0x81/0x350 [ 24.730646] ? __lock_acquire+0x664/0x3e00 [ 24.730653] ? lock_release+0xa40/0xa40 [ 24.730662] ? lock_acquire+0x1d5/0x580 [ 24.730667] ? lock_acquire+0x1d5/0x580 [ 24.730673] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.730681] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.730686] ? remove_wait_queue+0x81/0x350 [ 24.730693] remove_wait_queue+0x81/0x350 [ 24.730700] ? add_wait_queue+0x290/0x290 [ 24.730706] ? rcutorture_record_progress+0x10/0x10 [ 24.730716] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.730722] ? __kernel_text_address+0xd/0x40 [ 24.730730] ? clear_tfile_check_list+0x370/0x370 [ 24.730738] ? check_noncircular+0x20/0x20 [ 24.730746] ? locks_remove_file+0x3fa/0x5a0 [ 24.730755] ep_free+0x13f/0x320 [ 24.730761] ? ep_remove+0x800/0x800 [ 24.730766] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.730774] ? ep_free+0x320/0x320 [ 24.730780] ep_eventpoll_release+0x44/0x60 [ 24.730786] __fput+0x327/0x7e0 [ 24.730795] ? fput+0x140/0x140 [ 24.730801] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.730809] ____fput+0x15/0x20 [ 24.730816] task_work_run+0x199/0x270 [ 24.730823] ? task_work_cancel+0x210/0x210 [ 24.730829] ? _raw_spin_unlock+0x22/0x30 [ 24.730835] ? switch_task_namespaces+0x87/0xc0 [ 24.730847] do_exit+0x9bb/0x1ad0 [ 24.730853] ? binder_ioctl+0x4c1/0x1417 [ 24.730860] ? mm_update_next_owner+0x930/0x930 [ 24.730867] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.730875] ? avc_ss_reset+0x110/0x110 [ 24.730880] ? mutex_unlock+0xd/0x10 [ 24.730886] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.730904] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.730909] ? up_read+0x1a/0x40 [ 24.730915] ? rcu_note_context_switch+0x710/0x710 [ 24.730920] ? __fd_install+0x288/0x740 [ 24.730928] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.730933] ? do_vfs_ioctl+0x486/0x1520 [ 24.730938] ? _cond_resched+0x14/0x30 [ 24.730946] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.730953] ? selinux_capable+0x40/0x40 [ 24.730959] ? __alloc_fd+0x750/0x750 [ 24.730967] do_group_exit+0x149/0x400 [ 24.730974] ? SyS_exit+0x30/0x30 [ 24.730980] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.730987] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.730994] SyS_exit_group+0x1d/0x20 [ 24.731001] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.731004] RIP: 0033:0x4429f8 [ 24.731007] RSP: 002b:00007fff50206d68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.731013] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.731016] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.731019] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.731023] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.731026] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.749893] Dumping ftrace buffer: [ 24.749896] (ftrace buffer empty) [ 24.749899] Kernel Offset: disabled [ 25.874950] Rebooting in 86400 seconds..