[ 12.264663] audit: type=1400 audit(1541054231.628:4): avc: denied { syslog } for pid=1906 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [....] 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. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.66' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 54.598865] ================================================================== [ 54.606461] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 54.613195] Read of size 8 at addr ffff8801d016d1e8 by task blkid/2413 [ 54.619825] [ 54.621445] CPU: 0 PID: 2413 Comm: blkid Not tainted 4.4.162+ #117 [ 54.627733] 0000000000000000 ec201b1227002abf ffff8801d03476d0 ffffffff81a994bd [ 54.635748] ffffea0007405a00 ffff8801d016d1e8 0000000000000000 ffff8801d016d1e8 [ 54.643742] 0000000000000000 ffff8801d0347708 ffffffff8148a669 ffff8801d016d1e8 [ 54.651735] Call Trace: [ 54.654298] [] dump_stack+0xc1/0x124 [ 54.659633] [] print_address_description+0x6c/0x217 [ 54.666266] [] kasan_report.cold.6+0x175/0x2f7 [ 54.672540] [] ? disk_unblock_events+0x51/0x60 [ 54.678758] [] __asan_report_load8_noabort+0x14/0x20 [ 54.685483] [] disk_unblock_events+0x51/0x60 [ 54.691636] [] __blkdev_get+0x70c/0xdf0 [ 54.697233] [] ? trace_hardirqs_on+0x10/0x10 [ 54.703258] [] ? __blkdev_put+0x840/0x840 [ 54.709160] [] ? avc_has_perm_noaudit+0x197/0x2f0 [ 54.715636] [] ? avc_has_perm_noaudit+0x90/0x2f0 [ 54.722012] [] ? fsnotify+0x866/0x10c0 [ 54.727519] [] blkdev_get+0x2da/0x920 [ 54.732947] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 54.739690] [] ? bd_may_claim+0xd0/0xd0 [ 54.745280] [] ? bd_acquire+0x29/0x370 [ 54.750793] [] ? bd_acquire+0x8a/0x370 [ 54.756325] [] ? _raw_spin_unlock+0x2c/0x50 [ 54.762380] [] blkdev_open+0x1a5/0x250 [ 54.767893] [] do_dentry_open+0x38d/0xbd0 [ 54.773668] [] ? __inode_permission2+0x9b/0x240 [ 54.779960] [] ? blkdev_get_by_dev+0x70/0x70 [ 54.785992] [] vfs_open+0x12a/0x210 [ 54.791238] [] ? may_open.isra.18+0x156/0x240 [ 54.797357] [] path_openat+0x50c/0x39a0 [ 54.802952] [] ? may_open.isra.18+0x240/0x240 [ 54.809070] [] ? getname+0x19/0x20 [ 54.814230] [] ? do_sys_open+0x203/0x610 [ 54.819911] [] ? SyS_open+0x2d/0x40 [ 54.825180] [] ? entry_SYSCALL_64_fastpath+0x1e/0x9a [ 54.831923] [] ? trace_hardirqs_on+0x10/0x10 [ 54.837952] [] do_filp_open+0x197/0x270 [ 54.843551] [] ? user_path_mountpoint_at+0x70/0x70 [ 54.850120] [] ? __alloc_fd+0x36/0x4a0 [ 54.855779] [] ? _raw_spin_unlock+0x2c/0x50 [ 54.861719] [] ? __alloc_fd+0x1f3/0x4a0 [ 54.867432] [] do_sys_open+0x31c/0x610 [ 54.872939] [] ? filp_open+0x70/0x70 [ 54.878278] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 54.885087] [] SyS_open+0x2d/0x40 [ 54.890168] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 54.896712] [ 54.898309] Allocated by task 2403: [ 54.902184] [] save_stack_trace+0x26/0x50 [ 54.908088] [] kasan_kmalloc.part.1+0x62/0xf0 [ 54.914331] [] kasan_kmalloc+0xaf/0xc0 [ 54.919975] [] kmem_cache_alloc_trace+0x117/0x2d0 [ 54.926575] [] alloc_disk_node+0x54/0x3a0 [ 54.932470] [] alloc_disk+0x18/0x20 [ 54.937840] [] loop_add+0x36b/0x7c0 [ 54.943211] [] loop_probe+0x14f/0x180 [ 54.948746] [] kobj_lookup+0x223/0x410 [ 54.954375] [] get_gendisk+0x39/0x2d0 [ 54.959984] [] __blkdev_get+0x39c/0xdf0 [ 54.965716] [] blkdev_get+0x488/0x920 [ 54.971284] [] blkdev_open+0x1a5/0x250 [ 54.976908] [] do_dentry_open+0x38d/0xbd0 [ 54.982802] [] vfs_open+0x12a/0x210 [ 54.988188] [] path_openat+0x50c/0x39a0 [ 54.993914] [] do_filp_open+0x197/0x270 [ 54.999787] [] do_sys_open+0x31c/0x610 [ 55.005435] [] SyS_open+0x2d/0x40 [ 55.010626] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 55.017296] [ 55.018899] Freed by task 2413: [ 55.022154] [] save_stack_trace+0x26/0x50 [ 55.028060] [] kasan_slab_free+0xac/0x190 [ 55.034076] [] kfree+0xf4/0x310 [ 55.039101] [] disk_release+0x259/0x330 [ 55.044825] [] device_release+0x7e/0x220 [ 55.050650] [] kobject_put+0x144/0x260 [ 55.056273] [] put_disk+0x23/0x30 [ 55.061490] [] __blkdev_get+0x66c/0xdf0 [ 55.067202] [] blkdev_get+0x2da/0x920 [ 55.072899] [] blkdev_open+0x1a5/0x250 [ 55.078527] [] do_dentry_open+0x38d/0xbd0 [ 55.084420] [] vfs_open+0x12a/0x210 [ 55.089798] [] path_openat+0x50c/0x39a0 [ 55.095514] [] do_filp_open+0x197/0x270 [ 55.101437] [] do_sys_open+0x31c/0x610 [ 55.107072] [] SyS_open+0x2d/0x40 [ 55.112259] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 55.119069] [ 55.120830] The buggy address belongs to the object at ffff8801d016cc80 [ 55.120830] which belongs to the cache kmalloc-2048 of size 2048 [ 55.133631] The buggy address is located 1384 bytes inside of [ 55.133631] 2048-byte region [ffff8801d016cc80, ffff8801d016d480) [ 55.145648] The buggy address belongs to the page: [ 55.151096] ------------[ cut here ]------------ [ 55.157561] ------------[ cut here ]------------ [ 55.157577] WARNING: CPU: 1 PID: 2783 at lib/debugobjects.c:263 debug_print_object+0x181/0x210() [ 55.157588] ODEBUG: deactivate not available (active state 0) object type: hrtimer hint: tick_sched_timer+0x0/0x130 [ 55.157592] Kernel panic - not syncing: panic_on_warn set ... [ 55.157592] [ 55.157598] CPU: 1 PID: 2783 Comm: syz-executor065 Not tainted 4.4.162+ #117 [ 55.157606] 0000000000000000 ed75d35c679a9097 ffff8801db707a98 ffffffff81a994bd [ 55.157613] ffffffff828354e0 ffff8801ce1ec740 ffffffff82929e00 0000000000000009 [ 55.157620] 0000000000000107 ffff8801db707b58 ffffffff813a0e94 0000000041b58ab3 [ 55.157621] Call Trace: [ 55.157633] [] dump_stack+0xc1/0x124 [ 55.157642] [] panic+0x19e/0x359 [ 55.157650] [] ? add_taint.cold.4+0x16/0x16 [ 55.157658] [] ? warn_slowpath_common.cold.6+0x5/0x20 [ 55.157667] [] warn_slowpath_common.cold.6+0x20/0x20 [ 55.157674] [] ? debug_print_object+0x181/0x210 [ 55.157681] [] ? ktime_add_safe+0x150/0x150 [ 55.157691] [] warn_slowpath_fmt+0xbf/0x100 [ 55.157697] [] ? warn_slowpath_common+0x120/0x120 [ 55.157706] [] ? trace_hardirqs_on+0x10/0x10 [ 55.157712] [] ? trace_hardirqs_on+0x10/0x10 [ 55.157721] [] debug_print_object+0x181/0x210 [ 55.157728] [] ? tick_sched_handle.isra.6+0xf0/0xf0 [ 55.157736] [] debug_object_deactivate+0x208/0x340 [ 55.157742] [] ? debug_object_activate+0x480/0x480 [ 55.157747] [] ? kvm_clock_get_cycles+0x9/0x10 [ 55.157752] [] ? ktime_get+0x171/0x1e0 [ 55.157755] [] ? clockevents_program_event+0x1bc/0x3e0 [ 55.157758] [] __hrtimer_run_queues+0x215/0xfc0 [ 55.157762] [] ? clockevents_program_event+0x17a/0x3e0 [ 55.157765] [] ? hrtimer_fixup_init+0x70/0x70 [ 55.157768] [] ? kvm_clock_read+0x23/0x40 [ 55.157771] [] ? kvm_clock_get_cycles+0x9/0x10 [ 55.157774] [] ? hrtimer_interrupt+0x12d/0x430 [ 55.157777] [] hrtimer_interrupt+0x1b1/0x430 [ 55.157781] [] local_apic_timer_interrupt+0x74/0xa0 [ 55.157788] [] smp_apic_timer_interrupt+0x7c/0xa0 [ 55.157791] [] apic_timer_interrupt+0x9d/0xb0 [ 55.157797] [] ? console_unlock+0x659/0xa10 [ 55.157800] [] ? console_unlock+0x664/0xa10 [ 55.157803] [] vprintk_emit+0x3f5/0x830 [ 55.157806] [] vprintk+0x28/0x30 [ 55.157809] [] vprintk_default+0x1d/0x30 [ 55.157813] [] printk+0xaf/0xd7 [ 55.157816] [] ? log_wakeup_reason.cold.1+0x13f/0x13f [ 55.157821] [] ? check_preemption_disabled+0x3b/0x170 [ 55.157825] [] ? disable_trace_on_warning+0x46/0x50 [ 55.157829] [] warn_slowpath_common+0x37/0x120 [ 55.157833] [] ? kobject_get+0xca/0xf0 [ 55.157836] [] warn_slowpath_null+0x29/0x30 [ 55.157839] [] kobject_get+0xca/0xf0 [ 55.157847] [] get_disk+0x8a/0xd0 [ 55.157850] [] exact_lock+0x15/0x30 [ 55.157853] [] ? get_disk+0xd0/0xd0 [ 55.157860] [] kobj_lookup+0x1e1/0x410 [ 55.157863] [] ? blkdev_ioctl+0x19a0/0x19a0 [ 55.157866] [] get_gendisk+0x39/0x2d0 [ 55.157872] [] blkdev_get+0xf6/0x920 [ 55.157877] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 55.157880] [] ? bd_may_claim+0xd0/0xd0 [ 55.157883] [] ? bd_acquire+0x29/0x370 [ 55.157886] [] ? bd_acquire+0x8a/0x370 [ 55.157893] [] ? _raw_spin_unlock+0x2c/0x50 [ 55.157896] [] blkdev_open+0x1a5/0x250 [ 55.157904] [] do_dentry_open+0x38d/0xbd0 [ 55.157910] [] ? __inode_permission2+0x9b/0x240 [ 55.157913] [] ? blkdev_get_by_dev+0x70/0x70 [ 55.157916] [] vfs_open+0x12a/0x210 [ 55.157919] [] ? may_open.isra.18+0x156/0x240 [ 55.157923] [] path_openat+0x50c/0x39a0 [ 55.157926] [] ? may_open.isra.18+0x240/0x240 [ 55.157929] [] ? getname+0x19/0x20 [ 55.157939] [] ? do_sys_open+0x203/0x610 [ 55.157942] [] ? SyS_open+0x2d/0x40 [ 55.157946] [] ? entry_SYSCALL_64_fastpath+0x1e/0x9a [ 55.157949] [] ? trace_hardirqs_on+0x10/0x10 [ 55.157955] [] do_filp_open+0x197/0x270 [ 55.157958] [] ? user_path_mountpoint_at+0x70/0x70 [ 55.157964] [] ? __alloc_fd+0x36/0x4a0 [ 55.157967] [] ? _raw_spin_unlock+0x2c/0x50 [ 55.157970] [] ? __alloc_fd+0x1f3/0x4a0 [ 55.157973] [] do_sys_open+0x31c/0x610 [ 55.157976] [] ? filp_open+0x70/0x70 [ 55.157979] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 55.157982] [] SyS_open+0x2d/0x40 [ 55.157986] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 56.313304] Shutting down cpus with NMI [ 56.314058] Kernel Offset: disabled [ 56.861693] Rebooting in 86400 seconds..