[?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. [ 11.519998] audit: type=1400 audit(1514565218.249:6): avc: denied { map } for pid=3130 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.8' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 49.982755] audit: type=1400 audit(1514565256.712:7): avc: denied { map } for pid=3150 comm="syzkaller888449" path="/root/syzkaller888449716" 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 [ 49.987242] ================================================================== [ 49.987254] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 49.987257] Read of size 8 at addr ffff8801c8415878 by task syzkaller888449/3150 [ 49.987258] [ 49.987264] CPU: 0 PID: 3150 Comm: syzkaller888449 Not tainted 4.15.0-rc4-mm1+ #49 [ 49.987266] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.987267] Call Trace: [ 49.987274] dump_stack+0x194/0x257 [ 49.987279] ? arch_local_irq_restore+0x53/0x53 [ 49.987284] ? show_regs_print_info+0x18/0x18 [ 49.987288] ? print_irqtrace_events+0x270/0x270 [ 49.987292] ? __lock_acquire+0x664/0x3e00 [ 49.987296] ? __lock_acquire+0x3d4d/0x3e00 [ 49.987302] print_address_description+0x73/0x250 [ 49.987306] ? __lock_acquire+0x3d4d/0x3e00 [ 49.987310] kasan_report+0x23b/0x360 [ 49.987316] __asan_report_load8_noabort+0x14/0x20 [ 49.987319] __lock_acquire+0x3d4d/0x3e00 [ 49.987322] ? __lock_acquire+0x664/0x3e00 [ 49.987326] ? lock_downgrade+0x980/0x980 [ 49.987329] ? lock_downgrade+0x980/0x980 [ 49.987335] ? remove_wait_queue+0x81/0x350 [ 49.987341] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 49.987345] ? __lock_acquire+0x664/0x3e00 [ 49.987348] ? check_noncircular+0x20/0x20 [ 49.987356] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 49.987360] ? lock_acquire+0x1d5/0x580 [ 49.987363] ? lock_acquire+0x1d5/0x580 [ 49.987369] ? ep_free+0xf4/0x320 [ 49.987374] ? lock_release+0xa40/0xa40 [ 49.987379] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 49.987382] ? print_irqtrace_events+0x270/0x270 [ 49.987388] ? rcu_note_context_switch+0x710/0x710 [ 49.987392] ? __might_sleep+0x95/0x190 [ 49.987396] ? ep_free+0xf4/0x320 [ 49.987400] ? __mutex_lock+0x16f/0x1a80 [ 49.987403] ? ep_free+0xf4/0x320 [ 49.987407] ? print_irqtrace_events+0x270/0x270 [ 49.987410] ? ep_free+0xf4/0x320 [ 49.987415] lock_acquire+0x1d5/0x580 [ 49.987418] ? lock_acquire+0x1d5/0x580 [ 49.987422] ? remove_wait_queue+0x81/0x350 [ 49.987425] ? __lock_acquire+0x664/0x3e00 [ 49.987430] ? lock_release+0xa40/0xa40 [ 49.987435] ? lock_acquire+0x1d5/0x580 [ 49.987438] ? lock_acquire+0x1d5/0x580 [ 49.987442] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 49.987447] _raw_spin_lock_irqsave+0x96/0xc0 [ 49.987450] ? remove_wait_queue+0x81/0x350 [ 49.987454] remove_wait_queue+0x81/0x350 [ 49.987459] ? add_wait_queue+0x290/0x290 [ 49.987463] ? rcutorture_record_progress+0x10/0x10 [ 49.987469] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 49.987476] ? __kernel_text_address+0xd/0x40 [ 49.987480] ? clear_tfile_check_list+0x370/0x370 [ 49.987485] ? check_noncircular+0x20/0x20 [ 49.987490] ? locks_remove_file+0x3fa/0x5a0 [ 49.987496] ep_free+0x13f/0x320 [ 49.987500] ? ep_remove+0x800/0x800 [ 49.987503] ? fsnotify_first_mark+0x2b0/0x2b0 [ 49.987508] ? ep_free+0x320/0x320 [ 49.987511] ep_eventpoll_release+0x44/0x60 [ 49.987516] __fput+0x327/0x7e0 [ 49.987521] ? fput+0x140/0x140 [ 49.987525] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.987530] ____fput+0x15/0x20 [ 49.987534] task_work_run+0x199/0x270 [ 49.987538] ? task_work_cancel+0x210/0x210 [ 49.987542] ? _raw_spin_unlock+0x22/0x30 [ 49.987546] ? switch_task_namespaces+0x87/0xc0 [ 49.987551] do_exit+0x9bb/0x1ad0 [ 49.987557] ? binder_ioctl+0x551/0x1417 [ 49.987561] ? mm_update_next_owner+0x930/0x930 [ 49.987565] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 49.987572] ? avc_ss_reset+0x110/0x110 [ 49.987576] ? mutex_unlock+0xd/0x10 [ 49.987580] ? SyS_epoll_ctl+0x30a/0x1a80 [ 49.987592] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 49.987595] ? up_read+0x1a/0x40 [ 49.987599] ? rcu_note_context_switch+0x710/0x710 [ 49.987602] ? __fd_install+0x288/0x740 [ 49.987608] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 49.987611] ? do_vfs_ioctl+0x486/0x1520 [ 49.987614] ? _cond_resched+0x14/0x30 [ 49.987619] ? ioctl_preallocate+0x2b0/0x2b0 [ 49.987624] ? selinux_capable+0x40/0x40 [ 49.987628] ? __alloc_fd+0x750/0x750 [ 49.987633] do_group_exit+0x149/0x400 [ 49.987637] ? SyS_exit+0x30/0x30 [ 49.987641] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.987646] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 49.987650] SyS_exit_group+0x1d/0x20 [ 49.987654] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 49.987657] RIP: 0033:0x442a48 [ 49.987659] RSP: 002b:00007ffc6a92dd48 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 49.987663] RAX: ffffffffffffffda RBX: 6e69622f7665642f RCX: 0000000000442a48 [ 49.987665] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 49.987668] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 49.987669] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a90 [ 49.987671] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 49.987677] [ 49.987678] Allocated by task 3150: [ 49.987682] save_stack+0x43/0xd0 [ 49.987685] kasan_kmalloc+0xad/0xe0 [ 49.987688] kmem_cache_alloc_trace+0x136/0x750 [ 49.987691] binder_get_thread+0x1cf/0x870 [ 49.987693] binder_poll+0x8c/0x390 [ 49.987697] ep_item_poll.isra.10+0xf2/0x320 [ 49.987699] ep_insert+0x6a2/0x1ac0 [ 49.987702] SyS_epoll_ctl+0x12bf/0x1a80 [ 49.987705] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 49.987706] [ 49.987707] Freed by task 3150: [ 49.987710] save_stack+0x43/0xd0 [ 49.987713] kasan_slab_free+0x71/0xc0 [ 49.987715] kfree+0xd6/0x260 [ 49.987718] binder_thread_dec_tmpref+0x27f/0x310 [ 49.987721] binder_thread_release+0x27d/0x540 [ 49.987723] binder_ioctl+0xc02/0x1417 [ 49.987726] do_vfs_ioctl+0x1b1/0x1520 [ 49.987728] SyS_ioctl+0x8f/0xc0 [ 49.987731] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 49.987732] [ 49.987734] The buggy address belongs to the object at ffff8801c84157c0 [ 49.987734] which belongs to the cache kmalloc-512 of size 512 [ 49.987737] The buggy address is located 184 bytes inside of [ 49.987737] 512-byte region [ffff8801c84157c0, ffff8801c84159c0) [ 49.987738] The buggy address belongs to the page: [ 49.987741] page:ffffea0007210540 count:1 mapcount:0 mapping:ffff8801c8415040 index:0x0 [ 49.987744] flags: 0x2fffc0000000100(slab) [ 49.987750] raw: 02fffc0000000100 ffff8801c8415040 0000000000000000 0000000100000006 [ 49.987754] raw: ffffea00072dc520 ffffea00072690e0 ffff8801dac00940 0000000000000000 [ 49.987755] page dumped because: kasan: bad access detected [ 49.987756] [ 49.987757] Memory state around the buggy address: [ 49.987760] ffff8801c8415700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 49.987763] ffff8801c8415780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 49.987765] >ffff8801c8415800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.987767] ^ [ 49.987769] ffff8801c8415880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.987772] ffff8801c8415900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.987773] ================================================================== [ 49.987774] Disabling lock debugging due to kernel taint [ 49.987776] Kernel panic - not syncing: panic_on_warn set ... [ 49.987776] [ 49.987780] CPU: 0 PID: 3150 Comm: syzkaller888449 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 49.987782] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.987783] Call Trace: [ 49.987786] dump_stack+0x194/0x257 [ 49.987790] ? arch_local_irq_restore+0x53/0x53 [ 49.987793] ? kasan_end_report+0x32/0x50 [ 49.987797] ? lock_downgrade+0x980/0x980 [ 49.987800] ? vsnprintf+0x1ed/0x1900 [ 49.987804] ? __lock_acquire+0x3c90/0x3e00 [ 49.987807] panic+0x1e4/0x41c [ 49.987811] ? refcount_error_report+0x214/0x214 [ 49.987815] ? add_taint+0x40/0x50 [ 49.987818] ? add_taint+0x1c/0x50 [ 49.987822] ? __lock_acquire+0x3d4d/0x3e00 [ 49.987825] kasan_end_report+0x50/0x50 [ 49.987829] kasan_report+0x148/0x360 [ 49.987833] __asan_report_load8_noabort+0x14/0x20 [ 49.987837] __lock_acquire+0x3d4d/0x3e00 [ 49.987840] ? __lock_acquire+0x664/0x3e00 [ 49.987843] ? lock_downgrade+0x980/0x980 [ 49.987846] ? lock_downgrade+0x980/0x980 [ 49.987850] ? remove_wait_queue+0x81/0x350 [ 49.987855] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 49.987859] ? __lock_acquire+0x664/0x3e00 [ 49.987862] ? check_noncircular+0x20/0x20 [ 49.987869] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 49.987873] ? lock_acquire+0x1d5/0x580 [ 49.987876] ? lock_acquire+0x1d5/0x580 [ 49.987879] ? ep_free+0xf4/0x320 [ 49.987884] ? lock_release+0xa40/0xa40 [ 49.987887] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 49.987891] ? print_irqtrace_events+0x270/0x270 [ 49.987894] ? rcu_note_context_switch+0x710/0x710 [ 49.987899] ? __might_sleep+0x95/0x190 [ 49.987902] ? ep_free+0xf4/0x320 [ 49.987905] ? __mutex_lock+0x16f/0x1a80 [ 49.987908] ? ep_free+0xf4/0x320 [ 49.987912] ? print_irqtrace_events+0x270/0x270 [ 49.987915] ? ep_free+0xf4/0x320 [ 49.987919] lock_acquire+0x1d5/0x580 [ 49.987922] ? lock_acquire+0x1d5/0x580 [ 49.987926] ? remove_wait_queue+0x81/0x350 [ 49.987929] ? __lock_acquire+0x664/0x3e00 [ 49.987933] ? lock_release+0xa40/0xa40 [ 49.987938] ? lock_acquire+0x1d5/0x580 [ 49.987941] ? lock_acquire+0x1d5/0x580 [ 49.987945] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 49.987949] _raw_spin_lock_irqsave+0x96/0xc0 [ 49.987952] ? remove_wait_queue+0x81/0x350 [ 49.987956] remove_wait_queue+0x81/0x350 [ 49.987960] ? add_wait_queue+0x290/0x290 [ 49.987964] ? rcutorture_record_progress+0x10/0x10 [ 49.987969] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 49.987973] ? __kernel_text_address+0xd/0x40 [ 49.987978] ? clear_tfile_check_list+0x370/0x370 [ 49.987982] ? check_noncircular+0x20/0x20 [ 49.987986] ? locks_remove_file+0x3fa/0x5a0 [ 49.987991] ep_free+0x13f/0x320 [ 49.987995] ? ep_remove+0x800/0x800 [ 49.987998] ? fsnotify_first_mark+0x2b0/0x2b0 [ 49.988005] ? ep_free+0x320/0x320 [ 49.988009] ep_eventpoll_release+0x44/0x60 [ 49.988013] __fput+0x327/0x7e0 [ 49.988017] ? fput+0x140/0x140 [ 49.988021] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.988026] ____fput+0x15/0x20 [ 49.988029] task_work_run+0x199/0x270 [ 49.988034] ? task_work_cancel+0x210/0x210 [ 49.988037] ? _raw_spin_unlock+0x22/0x30 [ 49.988041] ? switch_task_namespaces+0x87/0xc0 [ 49.988045] do_exit+0x9bb/0x1ad0 [ 49.988049] ? binder_ioctl+0x551/0x1417 [ 49.988052] ? mm_update_next_owner+0x930/0x930 [ 49.988057] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 49.988061] ? avc_ss_reset+0x110/0x110 [ 49.988065] ? mutex_unlock+0xd/0x10 [ 49.988068] ? SyS_epoll_ctl+0x30a/0x1a80 [ 49.988079] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 49.988081] ? up_read+0x1a/0x40 [ 49.988085] ? rcu_note_context_switch+0x710/0x710 [ 49.988088] ? __fd_install+0x288/0x740 [ 49.988093] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 49.988096] ? do_vfs_ioctl+0x486/0x1520 [ 49.988099] ? _cond_resched+0x14/0x30 [ 49.988103] ? ioctl_preallocate+0x2b0/0x2b0 [ 49.988108] ? selinux_capable+0x40/0x40 [ 49.988111] ? __alloc_fd+0x750/0x750 [ 49.988116] do_group_exit+0x149/0x400 [ 49.988120] ? SyS_exit+0x30/0x30 [ 49.988123] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.988127] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 49.988131] SyS_exit_group+0x1d/0x20 [ 49.988135] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 49.988137] RIP: 0033:0x442a48 [ 49.988139] RSP: 002b:00007ffc6a92dd48 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 49.988142] RAX: ffffffffffffffda RBX: 6e69622f7665642f RCX: 0000000000442a48 [ 49.988144] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 49.988146] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 49.988148] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a90 [ 49.988150] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 50.008683] Dumping ftrace buffer: [ 50.008686] (ftrace buffer empty) [ 50.008688] Kernel Offset: disabled [ 51.133727] Rebooting in 86400 seconds..