[?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.657262] audit: type=1400 audit(1517301744.996:6): avc: denied { map } for pid=4156 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.0.48' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.971408] audit: type=1400 audit(1517301751.310:7): avc: denied { map } for pid=4170 comm="syzkaller027604" path="/root/syzkaller027604084" 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.976917] ================================================================== [ 24.976929] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 24.976934] Read of size 8 at addr ffff8801b15730f0 by task syzkaller027604/4170 [ 24.976936] [ 24.976943] CPU: 0 PID: 4170 Comm: syzkaller027604 Not tainted 4.15.0+ #286 [ 24.976946] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.976948] Call Trace: [ 24.976957] dump_stack+0x194/0x257 [ 24.976965] ? arch_local_irq_restore+0x53/0x53 [ 24.976973] ? show_regs_print_info+0x18/0x18 [ 24.976979] ? print_irqtrace_events+0x270/0x270 [ 24.976985] ? __lock_acquire+0x664/0x3e00 [ 24.976992] ? __lock_acquire+0x3d4d/0x3e00 [ 24.977005] print_address_description+0x73/0x250 [ 24.977011] ? __lock_acquire+0x3d4d/0x3e00 [ 24.977018] kasan_report+0x25b/0x340 [ 24.977026] __asan_report_load8_noabort+0x14/0x20 [ 24.977032] __lock_acquire+0x3d4d/0x3e00 [ 24.977038] ? __lock_acquire+0x664/0x3e00 [ 24.977044] ? lock_downgrade+0x980/0x980 [ 24.977049] ? lock_downgrade+0x980/0x980 [ 24.977057] ? remove_wait_queue+0x81/0x350 [ 24.977067] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.977074] ? __lock_acquire+0x664/0x3e00 [ 24.977079] ? check_noncircular+0x20/0x20 [ 24.977092] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.977099] ? lock_acquire+0x1d5/0x580 [ 24.977105] ? lock_acquire+0x1d5/0x580 [ 24.977113] ? ep_free+0xf4/0x320 [ 24.977122] ? lock_release+0xa40/0xa40 [ 24.977129] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.977136] ? print_irqtrace_events+0x270/0x270 [ 24.977143] ? rcu_note_context_switch+0x710/0x710 [ 24.977152] ? __might_sleep+0x95/0x190 [ 24.977158] ? ep_free+0xf4/0x320 [ 24.977165] ? __mutex_lock+0x16f/0x1a80 [ 24.977170] ? ep_free+0xf4/0x320 [ 24.977177] ? print_irqtrace_events+0x270/0x270 [ 24.977182] ? ep_free+0xf4/0x320 [ 24.977191] lock_acquire+0x1d5/0x580 [ 24.977196] ? lock_acquire+0x1d5/0x580 [ 24.977202] ? remove_wait_queue+0x81/0x350 [ 24.977208] ? __lock_acquire+0x664/0x3e00 [ 24.977216] ? lock_release+0xa40/0xa40 [ 24.977225] ? lock_acquire+0x1d5/0x580 [ 24.977230] ? lock_acquire+0x1d5/0x580 [ 24.977237] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.977245] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.977251] ? remove_wait_queue+0x81/0x350 [ 24.977257] remove_wait_queue+0x81/0x350 [ 24.977265] ? add_wait_queue+0x290/0x290 [ 24.977271] ? rcutorture_record_progress+0x10/0x10 [ 24.977282] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.977290] ? __kernel_text_address+0xd/0x40 [ 24.977298] ? clear_tfile_check_list+0x370/0x370 [ 24.977306] ? check_noncircular+0x20/0x20 [ 24.977315] ? locks_remove_file+0x3fa/0x5a0 [ 24.977325] ep_free+0x13f/0x320 [ 24.977331] ? ep_remove+0x800/0x800 [ 24.977337] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.977345] ? ep_free+0x320/0x320 [ 24.977352] ep_eventpoll_release+0x44/0x60 [ 24.977359] __fput+0x327/0x7e0 [ 24.977367] ? fput+0x140/0x140 [ 24.977375] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.977384] ____fput+0x15/0x20 [ 24.977390] task_work_run+0x199/0x270 [ 24.977398] ? task_work_cancel+0x210/0x210 [ 24.977405] ? _raw_spin_unlock+0x22/0x30 [ 24.977411] ? switch_task_namespaces+0x87/0xc0 [ 24.977419] do_exit+0x9bb/0x1ad0 [ 24.977433] ? binder_ioctl+0x4f1/0x1417 [ 24.977439] ? mm_update_next_owner+0x930/0x930 [ 24.977447] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.977458] ? avc_ss_reset+0x110/0x110 [ 24.977464] ? mutex_unlock+0xd/0x10 [ 24.977470] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.977489] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.977495] ? up_read+0x1a/0x40 [ 24.977501] ? rcu_note_context_switch+0x710/0x710 [ 24.977507] ? __fd_install+0x288/0x740 [ 24.977516] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.977523] ? do_vfs_ioctl+0x486/0x1520 [ 24.977528] ? _cond_resched+0x14/0x30 [ 24.977536] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.977542] ? selinux_capable+0x40/0x40 [ 24.977549] ? __alloc_fd+0x750/0x750 [ 24.977557] do_group_exit+0x149/0x400 [ 24.977564] ? SyS_exit+0x30/0x30 [ 24.977571] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.977580] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.977587] SyS_exit_group+0x1d/0x20 [ 24.977594] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.977599] RIP: 0033:0x4429f8 [ 24.977602] RSP: 002b:00007fff44e7d538 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.977608] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.977612] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.977615] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.977619] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.977622] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.977630] [ 24.977633] Allocated by task 4170: [ 24.977638] save_stack+0x43/0xd0 [ 24.977643] kasan_kmalloc+0xad/0xe0 [ 24.977648] kmem_cache_alloc_trace+0x136/0x750 [ 24.977653] binder_get_thread+0x1cf/0x870 [ 24.977657] binder_poll+0x8c/0x390 [ 24.977662] ep_item_poll.isra.10+0xec/0x320 [ 24.977667] ep_insert+0x6a3/0x1b10 [ 24.977672] SyS_epoll_ctl+0x12e4/0x1ab0 [ 24.977678] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.977679] [ 24.977681] Freed by task 4170: [ 24.977686] save_stack+0x43/0xd0 [ 24.977690] kasan_slab_free+0x71/0xc0 [ 24.977694] kfree+0xd6/0x260 [ 24.977699] binder_thread_dec_tmpref+0x27f/0x310 [ 24.977703] binder_thread_release+0x27d/0x540 [ 24.977708] binder_ioctl+0xc02/0x1417 [ 24.977713] do_vfs_ioctl+0x1b1/0x1520 [ 24.977717] SyS_ioctl+0x8f/0xc0 [ 24.977722] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.977724] [ 24.977728] The buggy address belongs to the object at ffff8801b1573040 [ 24.977728] which belongs to the cache kmalloc-512 of size 512 [ 24.977733] The buggy address is located 176 bytes inside of [ 24.977733] 512-byte region [ffff8801b1573040, ffff8801b1573240) [ 24.977734] The buggy address belongs to the page: [ 24.977739] page:ffffea0006c55cc0 count:1 mapcount:0 mapping:ffff8801b1573040 index:0x0 [ 24.977744] flags: 0x2fffc0000000100(slab) [ 24.977752] raw: 02fffc0000000100 ffff8801b1573040 0000000000000000 0000000100000006 [ 24.977759] raw: ffffea0006c57da0 ffffea00072d91e0 ffff8801db000940 0000000000000000 [ 24.977762] page dumped because: kasan: bad access detected [ 24.977763] [ 24.977764] Memory state around the buggy address: [ 24.977769] ffff8801b1572f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 24.977773] ffff8801b1573000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 24.977778] >ffff8801b1573080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.977780] ^ [ 24.977784] ffff8801b1573100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.977789] ffff8801b1573180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.977790] ================================================================== [ 24.977792] Disabling lock debugging due to kernel taint [ 24.977795] Kernel panic - not syncing: panic_on_warn set ... [ 24.977795] [ 24.977801] CPU: 0 PID: 4170 Comm: syzkaller027604 Tainted: G B 4.15.0+ #286 [ 24.977804] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.977805] Call Trace: [ 24.977811] dump_stack+0x194/0x257 [ 24.977819] ? arch_local_irq_restore+0x53/0x53 [ 24.977824] ? kasan_end_report+0x32/0x50 [ 24.977831] ? lock_downgrade+0x980/0x980 [ 24.977837] ? vsnprintf+0x1ed/0x1900 [ 24.977844] ? __lock_acquire+0x3cd0/0x3e00 [ 24.977849] panic+0x1e4/0x41c [ 24.977855] ? refcount_error_report+0x214/0x214 [ 24.977862] ? add_taint+0x40/0x50 [ 24.977868] ? add_taint+0x1c/0x50 [ 24.977875] ? __lock_acquire+0x3d4d/0x3e00 [ 24.977881] kasan_end_report+0x50/0x50 [ 24.977886] kasan_report+0x144/0x340 [ 24.977895] __asan_report_load8_noabort+0x14/0x20 [ 24.977900] __lock_acquire+0x3d4d/0x3e00 [ 24.977906] ? __lock_acquire+0x664/0x3e00 [ 24.977912] ? lock_downgrade+0x980/0x980 [ 24.977917] ? lock_downgrade+0x980/0x980 [ 24.977924] ? remove_wait_queue+0x81/0x350 [ 24.977933] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.977940] ? __lock_acquire+0x664/0x3e00 [ 24.977946] ? check_noncircular+0x20/0x20 [ 24.977958] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.977965] ? lock_acquire+0x1d5/0x580 [ 24.977970] ? lock_acquire+0x1d5/0x580 [ 24.977976] ? ep_free+0xf4/0x320 [ 24.977984] ? lock_release+0xa40/0xa40 [ 24.977990] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.977996] ? print_irqtrace_events+0x270/0x270 [ 24.978003] ? rcu_note_context_switch+0x710/0x710 [ 24.978010] ? __might_sleep+0x95/0x190 [ 24.978016] ? ep_free+0xf4/0x320 [ 24.978022] ? __mutex_lock+0x16f/0x1a80 [ 24.978027] ? ep_free+0xf4/0x320 [ 24.978034] ? print_irqtrace_events+0x270/0x270 [ 24.978039] ? ep_free+0xf4/0x320 [ 24.978047] lock_acquire+0x1d5/0x580 [ 24.978052] ? lock_acquire+0x1d5/0x580 [ 24.978058] ? remove_wait_queue+0x81/0x350 [ 24.978064] ? __lock_acquire+0x664/0x3e00 [ 24.978071] ? lock_release+0xa40/0xa40 [ 24.978081] ? lock_acquire+0x1d5/0x580 [ 24.978086] ? lock_acquire+0x1d5/0x580 [ 24.978092] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.978100] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.978106] ? remove_wait_queue+0x81/0x350 [ 24.978112] remove_wait_queue+0x81/0x350 [ 24.978120] ? add_wait_queue+0x290/0x290 [ 24.978126] ? rcutorture_record_progress+0x10/0x10 [ 24.978136] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.978142] ? __kernel_text_address+0xd/0x40 [ 24.978150] ? clear_tfile_check_list+0x370/0x370 [ 24.978158] ? check_noncircular+0x20/0x20 [ 24.978166] ? locks_remove_file+0x3fa/0x5a0 [ 24.978175] ep_free+0x13f/0x320 [ 24.978181] ? ep_remove+0x800/0x800 [ 24.978187] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.978195] ? ep_free+0x320/0x320 [ 24.978201] ep_eventpoll_release+0x44/0x60 [ 24.978207] __fput+0x327/0x7e0 [ 24.978215] ? fput+0x140/0x140 [ 24.978222] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.978231] ____fput+0x15/0x20 [ 24.978237] task_work_run+0x199/0x270 [ 24.978245] ? task_work_cancel+0x210/0x210 [ 24.978251] ? _raw_spin_unlock+0x22/0x30 [ 24.978257] ? switch_task_namespaces+0x87/0xc0 [ 24.978265] do_exit+0x9bb/0x1ad0 [ 24.978272] ? binder_ioctl+0x4f1/0x1417 [ 24.978278] ? mm_update_next_owner+0x930/0x930 [ 24.978285] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.978293] ? avc_ss_reset+0x110/0x110 [ 24.978299] ? mutex_unlock+0xd/0x10 [ 24.978305] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.978323] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.978328] ? up_read+0x1a/0x40 [ 24.978335] ? rcu_note_context_switch+0x710/0x710 [ 24.978340] ? __fd_install+0x288/0x740 [ 24.978348] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 24.978354] ? do_vfs_ioctl+0x486/0x1520 [ 24.978358] ? _cond_resched+0x14/0x30 [ 24.978366] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.978372] ? selinux_capable+0x40/0x40 [ 24.978379] ? __alloc_fd+0x750/0x750 [ 24.978387] do_group_exit+0x149/0x400 [ 24.978393] ? SyS_exit+0x30/0x30 [ 24.978400] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.978407] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.978414] SyS_exit_group+0x1d/0x20 [ 24.978421] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 24.978428] RIP: 0033:0x4429f8 [ 24.978431] RSP: 002b:00007fff44e7d538 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.978437] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.978440] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.978444] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.978447] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.978450] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.997725] Dumping ftrace buffer: [ 24.997728] (ftrace buffer empty) [ 24.997731] Kernel Offset: disabled [ 26.123076] Rebooting in 86400 seconds..