[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 12.593493] audit: type=1400 audit(1514551745.579:6): avc: denied { map } for pid=3133 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.229' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.698465] audit: type=1400 audit(1514551757.684:7): avc: denied { map } for pid=3149 comm="syzkaller963535" path="/root/syzkaller963535278" 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.701960] ================================================================== [ 24.701973] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 24.701976] Read of size 8 at addr ffff8801c9c2a170 by task syzkaller963535/3149 [ 24.701977] [ 24.701982] CPU: 1 PID: 3149 Comm: syzkaller963535 Not tainted 4.15.0-rc5+ #240 [ 24.701985] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.701986] Call Trace: [ 24.701993] dump_stack+0x194/0x257 [ 24.701998] ? arch_local_irq_restore+0x53/0x53 [ 24.702008] ? show_regs_print_info+0x18/0x18 [ 24.702012] ? print_irqtrace_events+0x270/0x270 [ 24.702015] ? __lock_acquire+0x664/0x3e00 [ 24.702019] ? __lock_acquire+0x3d4d/0x3e00 [ 24.702025] print_address_description+0x73/0x250 [ 24.702028] ? __lock_acquire+0x3d4d/0x3e00 [ 24.702032] kasan_report+0x25b/0x340 [ 24.702037] __asan_report_load8_noabort+0x14/0x20 [ 24.702040] __lock_acquire+0x3d4d/0x3e00 [ 24.702044] ? __lock_acquire+0x664/0x3e00 [ 24.702047] ? lock_downgrade+0x980/0x980 [ 24.702050] ? lock_downgrade+0x980/0x980 [ 24.702056] ? remove_wait_queue+0x81/0x350 [ 24.702061] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.702065] ? __lock_acquire+0x664/0x3e00 [ 24.702068] ? check_noncircular+0x20/0x20 [ 24.702076] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.702080] ? lock_acquire+0x1d5/0x580 [ 24.702083] ? lock_acquire+0x1d5/0x580 [ 24.702088] ? ep_free+0xf4/0x320 [ 24.702093] ? lock_release+0xa40/0xa40 [ 24.702098] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.702101] ? print_irqtrace_events+0x270/0x270 [ 24.702106] ? rcu_note_context_switch+0x710/0x710 [ 24.702111] ? __might_sleep+0x95/0x190 [ 24.702114] ? ep_free+0xf4/0x320 [ 24.702118] ? __mutex_lock+0x16f/0x1a80 [ 24.702121] ? ep_free+0xf4/0x320 [ 24.702125] ? print_irqtrace_events+0x270/0x270 [ 24.702128] ? ep_free+0xf4/0x320 [ 24.702132] lock_acquire+0x1d5/0x580 [ 24.702135] ? lock_acquire+0x1d5/0x580 [ 24.702139] ? remove_wait_queue+0x81/0x350 [ 24.702143] ? __lock_acquire+0x664/0x3e00 [ 24.702147] ? lock_release+0xa40/0xa40 [ 24.702152] ? lock_acquire+0x1d5/0x580 [ 24.702155] ? lock_acquire+0x1d5/0x580 [ 24.702159] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.702164] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.702168] ? remove_wait_queue+0x81/0x350 [ 24.702171] remove_wait_queue+0x81/0x350 [ 24.702176] ? add_wait_queue+0x290/0x290 [ 24.702180] ? rcutorture_record_progress+0x10/0x10 [ 24.702185] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.702192] ? __kernel_text_address+0xd/0x40 [ 24.702197] ? clear_tfile_check_list+0x370/0x370 [ 24.702201] ? check_noncircular+0x20/0x20 [ 24.702207] ? locks_remove_file+0x3fa/0x5a0 [ 24.702212] ep_free+0x13f/0x320 [ 24.702216] ? ep_remove+0x800/0x800 [ 24.702220] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.702225] ? ep_free+0x320/0x320 [ 24.702228] ep_eventpoll_release+0x44/0x60 [ 24.702233] __fput+0x327/0x7e0 [ 24.702237] ? fput+0x140/0x140 [ 24.702241] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.702246] ____fput+0x15/0x20 [ 24.702250] task_work_run+0x199/0x270 [ 24.702255] ? task_work_cancel+0x210/0x210 [ 24.702258] ? _raw_spin_unlock+0x22/0x30 [ 24.702262] ? switch_task_namespaces+0x87/0xc0 [ 24.702268] do_exit+0x9bb/0x1ad0 [ 24.702274] ? binder_ioctl+0x511/0x1417 [ 24.702277] ? mm_update_next_owner+0x930/0x930 [ 24.702282] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.702289] ? avc_ss_reset+0x110/0x110 [ 24.702292] ? mutex_unlock+0xd/0x10 [ 24.702295] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.702307] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.702310] ? up_read+0x1a/0x40 [ 24.702314] ? rcu_note_context_switch+0x710/0x710 [ 24.702318] ? __fd_install+0x288/0x740 [ 24.702323] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.702328] ? do_vfs_ioctl+0x486/0x1520 [ 24.702331] ? _cond_resched+0x14/0x30 [ 24.702337] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.702341] ? selinux_capable+0x40/0x40 [ 24.702345] ? __alloc_fd+0x750/0x750 [ 24.702350] do_group_exit+0x149/0x400 [ 24.702354] ? SyS_exit+0x30/0x30 [ 24.702358] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.702363] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.702368] SyS_exit_group+0x1d/0x20 [ 24.702372] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.702375] RIP: 0033:0x4429f8 [ 24.702377] RSP: 002b:00007ffef02b1798 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.702381] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.702383] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.702386] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.702388] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.702390] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.702395] [ 24.702397] Allocated by task 3149: [ 24.702401] save_stack+0x43/0xd0 [ 24.702403] kasan_kmalloc+0xad/0xe0 [ 24.702407] kmem_cache_alloc_trace+0x136/0x750 [ 24.702411] binder_get_thread+0x1cf/0x870 [ 24.702413] binder_poll+0x8c/0x390 [ 24.702416] ep_item_poll.isra.10+0xec/0x320 [ 24.702419] ep_insert+0x6a3/0x1b10 [ 24.702421] SyS_epoll_ctl+0x12e4/0x1ab0 [ 24.702424] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.702425] [ 24.702427] Freed by task 3149: [ 24.702429] save_stack+0x43/0xd0 [ 24.702432] kasan_slab_free+0x71/0xc0 [ 24.702434] kfree+0xd6/0x260 [ 24.702437] binder_thread_dec_tmpref+0x27f/0x310 [ 24.702440] binder_thread_release+0x27d/0x540 [ 24.702443] binder_ioctl+0xc02/0x1417 [ 24.702446] do_vfs_ioctl+0x1b1/0x1520 [ 24.702449] SyS_ioctl+0x8f/0xc0 [ 24.702452] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.702453] [ 24.702455] The buggy address belongs to the object at ffff8801c9c2a0c0 [ 24.702455] which belongs to the cache kmalloc-512 of size 512 [ 24.702458] The buggy address is located 176 bytes inside of [ 24.702458] 512-byte region [ffff8801c9c2a0c0, ffff8801c9c2a2c0) [ 24.702459] The buggy address belongs to the page: [ 24.702463] page:0000000027f8053d count:1 mapcount:0 mapping:0000000038b41050 index:0xffff8801c9c2aac0 [ 24.702467] flags: 0x2fffc0000000100(slab) [ 24.702473] raw: 02fffc0000000100 ffff8801c9c2a0c0 ffff8801c9c2aac0 0000000100000002 [ 24.702477] raw: ffffea00072b3760 ffffea00072769e0 ffff8801db000940 0000000000000000 [ 24.702479] page dumped because: kasan: bad access detected [ 24.702479] [ 24.702480] Memory state around the buggy address: [ 24.702483] ffff8801c9c2a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.702486] ffff8801c9c2a080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 24.702489] >ffff8801c9c2a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.702490] ^ [ 24.702493] ffff8801c9c2a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.702495] ffff8801c9c2a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.702496] ================================================================== [ 24.702498] Disabling lock debugging due to kernel taint [ 24.702500] Kernel panic - not syncing: panic_on_warn set ... [ 24.702500] [ 24.702503] CPU: 1 PID: 3149 Comm: syzkaller963535 Tainted: G B 4.15.0-rc5+ #240 [ 24.702505] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.702506] Call Trace: [ 24.702510] dump_stack+0x194/0x257 [ 24.702515] ? arch_local_irq_restore+0x53/0x53 [ 24.702518] ? kasan_end_report+0x32/0x50 [ 24.702521] ? lock_downgrade+0x980/0x980 [ 24.702525] ? vsnprintf+0x1ed/0x1900 [ 24.702528] ? __lock_acquire+0x3cd0/0x3e00 [ 24.702532] panic+0x1e4/0x41c [ 24.702535] ? refcount_error_report+0x214/0x214 [ 24.702539] ? add_taint+0x40/0x50 [ 24.702542] ? add_taint+0x1c/0x50 [ 24.702546] ? __lock_acquire+0x3d4d/0x3e00 [ 24.702550] kasan_end_report+0x50/0x50 [ 24.702553] kasan_report+0x144/0x340 [ 24.702558] __asan_report_load8_noabort+0x14/0x20 [ 24.702561] __lock_acquire+0x3d4d/0x3e00 [ 24.702564] ? __lock_acquire+0x664/0x3e00 [ 24.702567] ? lock_downgrade+0x980/0x980 [ 24.702570] ? lock_downgrade+0x980/0x980 [ 24.702575] ? remove_wait_queue+0x81/0x350 [ 24.702580] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.702583] ? __lock_acquire+0x664/0x3e00 [ 24.702586] ? check_noncircular+0x20/0x20 [ 24.702593] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.702597] ? lock_acquire+0x1d5/0x580 [ 24.702600] ? lock_acquire+0x1d5/0x580 [ 24.702603] ? ep_free+0xf4/0x320 [ 24.702608] ? lock_release+0xa40/0xa40 [ 24.702611] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.702615] ? print_irqtrace_events+0x270/0x270 [ 24.702619] ? rcu_note_context_switch+0x710/0x710 [ 24.702623] ? __might_sleep+0x95/0x190 [ 24.702626] ? ep_free+0xf4/0x320 [ 24.702629] ? __mutex_lock+0x16f/0x1a80 [ 24.702631] ? ep_free+0xf4/0x320 [ 24.702635] ? print_irqtrace_events+0x270/0x270 [ 24.702638] ? ep_free+0xf4/0x320 [ 24.702642] lock_acquire+0x1d5/0x580 [ 24.702645] ? lock_acquire+0x1d5/0x580 [ 24.702649] ? remove_wait_queue+0x81/0x350 [ 24.702652] ? __lock_acquire+0x664/0x3e00 [ 24.702656] ? lock_release+0xa40/0xa40 [ 24.702661] ? lock_acquire+0x1d5/0x580 [ 24.702664] ? lock_acquire+0x1d5/0x580 [ 24.702668] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.702672] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.702675] ? remove_wait_queue+0x81/0x350 [ 24.702679] remove_wait_queue+0x81/0x350 [ 24.702683] ? add_wait_queue+0x290/0x290 [ 24.702687] ? rcutorture_record_progress+0x10/0x10 [ 24.702692] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.702696] ? __kernel_text_address+0xd/0x40 [ 24.702700] ? clear_tfile_check_list+0x370/0x370 [ 24.702704] ? check_noncircular+0x20/0x20 [ 24.702708] ? locks_remove_file+0x3fa/0x5a0 [ 24.702713] ep_free+0x13f/0x320 [ 24.702716] ? ep_remove+0x800/0x800 [ 24.702720] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.702724] ? ep_free+0x320/0x320 [ 24.702728] ep_eventpoll_release+0x44/0x60 [ 24.702731] __fput+0x327/0x7e0 [ 24.702735] ? fput+0x140/0x140 [ 24.702739] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.702748] ____fput+0x15/0x20 [ 24.702752] task_work_run+0x199/0x270 [ 24.702756] ? task_work_cancel+0x210/0x210 [ 24.702760] ? _raw_spin_unlock+0x22/0x30 [ 24.702763] ? switch_task_namespaces+0x87/0xc0 [ 24.702767] do_exit+0x9bb/0x1ad0 [ 24.702772] ? binder_ioctl+0x511/0x1417 [ 24.702775] ? mm_update_next_owner+0x930/0x930 [ 24.702780] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.702785] ? avc_ss_reset+0x110/0x110 [ 24.702788] ? mutex_unlock+0xd/0x10 [ 24.702791] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.702801] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.702804] ? up_read+0x1a/0x40 [ 24.702808] ? rcu_note_context_switch+0x710/0x710 [ 24.702811] ? __fd_install+0x288/0x740 [ 24.702817] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.702820] ? do_vfs_ioctl+0x486/0x1520 [ 24.702824] ? _cond_resched+0x14/0x30 [ 24.702828] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.702832] ? selinux_capable+0x40/0x40 [ 24.702836] ? __alloc_fd+0x750/0x750 [ 24.702841] do_group_exit+0x149/0x400 [ 24.702845] ? SyS_exit+0x30/0x30 [ 24.702849] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.702852] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.702857] SyS_exit_group+0x1d/0x20 [ 24.702860] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.702863] RIP: 0033:0x4429f8 [ 24.702865] RSP: 002b:00007ffef02b1798 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.702868] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.702870] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.702872] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.702874] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.702876] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.724338] Dumping ftrace buffer: [ 24.724342] (ftrace buffer empty) [ 24.724343] Kernel Offset: disabled [ 25.850083] Rebooting in 86400 seconds..