[....] Starting enhanced syslogd: rsyslogd[ 10.975341] audit: type=1400 audit(1514064465.991:5): avc: denied { syslog } for pid=2998 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: [ 17.238196] audit: type=1400 audit(1514064472.253:6): avc: denied { map } for pid=3138 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 'ci-upstream-kasan-gce-4,10.128.15.233' (ECDSA) to the list of known hosts. executing program [ 31.582101] audit: type=1400 audit(1514064486.597:7): avc: denied { map } for pid=3155 comm="syzkaller577035" path="/root/syzkaller577035356" 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 [ 31.587347] ================================================================== [ 31.587361] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 31.587365] Read of size 8 at addr ffff8801ca0e55f0 by task syzkaller577035/3155 [ 31.587366] [ 31.587371] CPU: 1 PID: 3155 Comm: syzkaller577035 Not tainted 4.15.0-rc4+ #236 [ 31.587374] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.587376] Call Trace: [ 31.587383] dump_stack+0x194/0x257 [ 31.587388] ? arch_local_irq_restore+0x53/0x53 [ 31.587394] ? show_regs_print_info+0x18/0x18 [ 31.587397] ? print_irqtrace_events+0x270/0x270 [ 31.587401] ? __lock_acquire+0x664/0x3e00 [ 31.587405] ? __lock_acquire+0x3d4d/0x3e00 [ 31.587411] print_address_description+0x73/0x250 [ 31.587415] ? __lock_acquire+0x3d4d/0x3e00 [ 31.587418] kasan_report+0x25b/0x340 [ 31.587426] __asan_report_load8_noabort+0x14/0x20 [ 31.587429] __lock_acquire+0x3d4d/0x3e00 [ 31.587433] ? __lock_acquire+0x664/0x3e00 [ 31.587436] ? lock_downgrade+0x980/0x980 [ 31.587439] ? lock_downgrade+0x980/0x980 [ 31.587445] ? remove_wait_queue+0x81/0x350 [ 31.587450] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.587454] ? __lock_acquire+0x664/0x3e00 [ 31.587457] ? check_noncircular+0x20/0x20 [ 31.587465] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.587469] ? lock_acquire+0x1d5/0x580 [ 31.587472] ? lock_acquire+0x1d5/0x580 [ 31.587477] ? ep_free+0xf4/0x320 [ 31.587482] ? lock_release+0xa40/0xa40 [ 31.587487] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.587491] ? print_irqtrace_events+0x270/0x270 [ 31.587496] ? rcu_note_context_switch+0x710/0x710 [ 31.587500] ? __might_sleep+0x95/0x190 [ 31.587503] ? ep_free+0xf4/0x320 [ 31.587507] ? __mutex_lock+0x16f/0x1a80 [ 31.587509] ? ep_free+0xf4/0x320 [ 31.587514] ? print_irqtrace_events+0x270/0x270 [ 31.587516] ? ep_free+0xf4/0x320 [ 31.587521] lock_acquire+0x1d5/0x580 [ 31.587524] ? lock_acquire+0x1d5/0x580 [ 31.587529] ? remove_wait_queue+0x81/0x350 [ 31.587533] ? __lock_acquire+0x664/0x3e00 [ 31.587537] ? lock_release+0xa40/0xa40 [ 31.587543] ? lock_acquire+0x1d5/0x580 [ 31.587546] ? lock_acquire+0x1d5/0x580 [ 31.587549] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 31.587554] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.587558] ? remove_wait_queue+0x81/0x350 [ 31.587561] remove_wait_queue+0x81/0x350 [ 31.587566] ? add_wait_queue+0x290/0x290 [ 31.587570] ? rcutorture_record_progress+0x10/0x10 [ 31.587575] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 31.587583] ? __kernel_text_address+0xd/0x40 [ 31.587587] ? clear_tfile_check_list+0x370/0x370 [ 31.587592] ? check_noncircular+0x20/0x20 [ 31.587597] ? locks_remove_file+0x3fa/0x5a0 [ 31.587602] ep_free+0x13f/0x320 [ 31.587606] ? ep_remove+0x800/0x800 [ 31.587611] ? fsnotify_first_mark+0x2b0/0x2b0 [ 31.587616] ? ep_free+0x320/0x320 [ 31.587619] ep_eventpoll_release+0x44/0x60 [ 31.587623] __fput+0x327/0x7e0 [ 31.587628] ? fput+0x140/0x140 [ 31.587634] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.587639] ____fput+0x15/0x20 [ 31.587643] task_work_run+0x199/0x270 [ 31.587648] ? task_work_cancel+0x210/0x210 [ 31.587651] ? _raw_spin_unlock+0x22/0x30 [ 31.587655] ? switch_task_namespaces+0x87/0xc0 [ 31.587660] do_exit+0x9bb/0x1ad0 [ 31.587667] ? binder_ioctl+0x4a1/0x1417 [ 31.587670] ? mm_update_next_owner+0x930/0x930 [ 31.587675] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 31.587683] ? avc_ss_reset+0x110/0x110 [ 31.587686] ? mutex_unlock+0xd/0x10 [ 31.587690] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 31.587701] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.587704] ? up_read+0x1a/0x40 [ 31.587708] ? rcu_note_context_switch+0x710/0x710 [ 31.587712] ? __fd_install+0x288/0x740 [ 31.587717] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 31.587724] ? do_vfs_ioctl+0x486/0x1520 [ 31.587728] ? _cond_resched+0x14/0x30 [ 31.587733] ? ioctl_preallocate+0x2b0/0x2b0 [ 31.587738] ? selinux_capable+0x40/0x40 [ 31.587742] ? __alloc_fd+0x750/0x750 [ 31.587747] do_group_exit+0x149/0x400 [ 31.587751] ? SyS_exit+0x30/0x30 [ 31.587755] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.587760] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.587765] SyS_exit_group+0x1d/0x20 [ 31.587769] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 31.587772] RIP: 0033:0x4429f8 [ 31.587775] RSP: 002b:00007ffc5ce6efe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 31.587779] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 31.587781] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.587783] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.587785] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 31.587787] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 31.587791] [ 31.587793] Allocated by task 3155: [ 31.587797] save_stack+0x43/0xd0 [ 31.587800] kasan_kmalloc+0xad/0xe0 [ 31.587804] kmem_cache_alloc_trace+0x136/0x750 [ 31.587807] binder_get_thread+0x1cf/0x870 [ 31.587810] binder_poll+0x8c/0x390 [ 31.587813] ep_item_poll.isra.10+0xec/0x320 [ 31.587815] ep_insert+0x6a3/0x1b10 [ 31.587818] SyS_epoll_ctl+0x12e4/0x1ab0 [ 31.587821] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 31.587822] [ 31.587823] Freed by task 3155: [ 31.587831] save_stack+0x43/0xd0 [ 31.587834] kasan_slab_free+0x71/0xc0 [ 31.587836] kfree+0xd6/0x260 [ 31.587839] binder_thread_dec_tmpref+0x27f/0x310 [ 31.587842] binder_thread_release+0x27d/0x540 [ 31.587845] binder_ioctl+0xc02/0x1417 [ 31.587848] do_vfs_ioctl+0x1b1/0x1520 [ 31.587851] SyS_ioctl+0x8f/0xc0 [ 31.587854] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 31.587855] [ 31.587857] The buggy address belongs to the object at ffff8801ca0e5540 [ 31.587857] which belongs to the cache kmalloc-512 of size 512 [ 31.587860] The buggy address is located 176 bytes inside of [ 31.587860] 512-byte region [ffff8801ca0e5540, ffff8801ca0e5740) [ 31.587861] The buggy address belongs to the page: [ 31.587865] page:000000001e09926d count:1 mapcount:0 mapping:00000000713514ae index:0xffff8801ca0e5cc0 [ 31.587869] flags: 0x2fffc0000000100(slab) [ 31.587874] raw: 02fffc0000000100 ffff8801ca0e5040 ffff8801ca0e5cc0 0000000100000005 [ 31.587878] raw: ffffea0007280460 ffffea0007293fe0 ffff8801db000940 0000000000000000 [ 31.587880] page dumped because: kasan: bad access detected [ 31.587881] [ 31.587882] Memory state around the buggy address: [ 31.587884] ffff8801ca0e5480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.587887] ffff8801ca0e5500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 31.587889] >ffff8801ca0e5580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.587891] ^ [ 31.587893] ffff8801ca0e5600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.587896] ffff8801ca0e5680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.587897] ================================================================== [ 31.587898] Disabling lock debugging due to kernel taint [ 31.587901] Kernel panic - not syncing: panic_on_warn set ... [ 31.587901] [ 31.587905] CPU: 1 PID: 3155 Comm: syzkaller577035 Tainted: G B 4.15.0-rc4+ #236 [ 31.587907] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.587908] Call Trace: [ 31.587911] dump_stack+0x194/0x257 [ 31.587916] ? arch_local_irq_restore+0x53/0x53 [ 31.587921] ? kasan_end_report+0x32/0x50 [ 31.587925] ? lock_downgrade+0x980/0x980 [ 31.587928] ? vsnprintf+0x1ed/0x1900 [ 31.587932] ? __lock_acquire+0x3cd0/0x3e00 [ 31.587935] panic+0x1e4/0x41c [ 31.587938] ? refcount_error_report+0x214/0x214 [ 31.587942] ? add_taint+0x40/0x50 [ 31.587945] ? add_taint+0x1c/0x50 [ 31.587949] ? __lock_acquire+0x3d4d/0x3e00 [ 31.587952] kasan_end_report+0x50/0x50 [ 31.587955] kasan_report+0x144/0x340 [ 31.587960] __asan_report_load8_noabort+0x14/0x20 [ 31.587963] __lock_acquire+0x3d4d/0x3e00 [ 31.587966] ? __lock_acquire+0x664/0x3e00 [ 31.587970] ? lock_downgrade+0x980/0x980 [ 31.587974] ? lock_downgrade+0x980/0x980 [ 31.587980] ? remove_wait_queue+0x81/0x350 [ 31.587987] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.587992] ? __lock_acquire+0x664/0x3e00 [ 31.587997] ? check_noncircular+0x20/0x20 [ 31.588006] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.588010] ? lock_acquire+0x1d5/0x580 [ 31.588013] ? lock_acquire+0x1d5/0x580 [ 31.588016] ? ep_free+0xf4/0x320 [ 31.588021] ? lock_release+0xa40/0xa40 [ 31.588026] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.588030] ? print_irqtrace_events+0x270/0x270 [ 31.588033] ? rcu_note_context_switch+0x710/0x710 [ 31.588037] ? __might_sleep+0x95/0x190 [ 31.588040] ? ep_free+0xf4/0x320 [ 31.588043] ? __mutex_lock+0x16f/0x1a80 [ 31.588046] ? ep_free+0xf4/0x320 [ 31.588050] ? print_irqtrace_events+0x270/0x270 [ 31.588052] ? ep_free+0xf4/0x320 [ 31.588057] lock_acquire+0x1d5/0x580 [ 31.588060] ? lock_acquire+0x1d5/0x580 [ 31.588063] ? remove_wait_queue+0x81/0x350 [ 31.588067] ? __lock_acquire+0x664/0x3e00 [ 31.588071] ? lock_release+0xa40/0xa40 [ 31.588076] ? lock_acquire+0x1d5/0x580 [ 31.588079] ? lock_acquire+0x1d5/0x580 [ 31.588082] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 31.588086] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.588090] ? remove_wait_queue+0x81/0x350 [ 31.588093] remove_wait_queue+0x81/0x350 [ 31.588098] ? add_wait_queue+0x290/0x290 [ 31.588101] ? rcutorture_record_progress+0x10/0x10 [ 31.588106] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 31.588110] ? __kernel_text_address+0xd/0x40 [ 31.588117] ? clear_tfile_check_list+0x370/0x370 [ 31.588121] ? check_noncircular+0x20/0x20 [ 31.588125] ? locks_remove_file+0x3fa/0x5a0 [ 31.588130] ep_free+0x13f/0x320 [ 31.588133] ? ep_remove+0x800/0x800 [ 31.588137] ? fsnotify_first_mark+0x2b0/0x2b0 [ 31.588141] ? ep_free+0x320/0x320 [ 31.588144] ep_eventpoll_release+0x44/0x60 [ 31.588147] __fput+0x327/0x7e0 [ 31.588151] ? fput+0x140/0x140 [ 31.588155] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.588159] ____fput+0x15/0x20 [ 31.588163] task_work_run+0x199/0x270 [ 31.588167] ? task_work_cancel+0x210/0x210 [ 31.588171] ? _raw_spin_unlock+0x22/0x30 [ 31.588174] ? switch_task_namespaces+0x87/0xc0 [ 31.588178] do_exit+0x9bb/0x1ad0 [ 31.588183] ? binder_ioctl+0x4a1/0x1417 [ 31.588186] ? mm_update_next_owner+0x930/0x930 [ 31.588191] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 31.588196] ? avc_ss_reset+0x110/0x110 [ 31.588199] ? mutex_unlock+0xd/0x10 [ 31.588202] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 31.588211] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.588214] ? up_read+0x1a/0x40 [ 31.588220] ? rcu_note_context_switch+0x710/0x710 [ 31.588223] ? __fd_install+0x288/0x740 [ 31.588228] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 31.588232] ? do_vfs_ioctl+0x486/0x1520 [ 31.588235] ? _cond_resched+0x14/0x30 [ 31.588240] ? ioctl_preallocate+0x2b0/0x2b0 [ 31.588244] ? selinux_capable+0x40/0x40 [ 31.588248] ? __alloc_fd+0x750/0x750 [ 31.588252] do_group_exit+0x149/0x400 [ 31.588256] ? SyS_exit+0x30/0x30 [ 31.588260] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.588264] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.588268] SyS_exit_group+0x1d/0x20 [ 31.588272] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 31.588274] RIP: 0033:0x4429f8 [ 31.588276] RSP: 002b:00007ffc5ce6efe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 31.588279] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 31.588281] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.588283] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.588285] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 31.588287] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 31.608404] Dumping ftrace buffer: [ 31.608407] (ftrace buffer empty) [ 31.608408] Kernel Offset: disabled [ 32.737230] Rebooting in 86400 seconds..