[....] 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[ 11.812128] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 11.888708] random: crng init done Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.224' (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 syzkaller login: [ 34.868603] ================================================================== [ 34.869940] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 34.870921] Read of size 8 at addr ffff8801cdd4d1e0 by task syz-executor410/2104 [ 34.871936] [ 34.872296] CPU: 1 PID: 2104 Comm: syz-executor410 Not tainted 4.9.141+ #23 [ 34.873242] ffff8801cdc0f6e8 ffffffff81b42e79 ffffea0007375200 ffff8801cdd4d1e0 [ 34.874604] 0000000000000000 ffff8801cdd4d1e0 0000000000000000 ffff8801cdc0f720 [ 34.875985] ffffffff815009b8 ffff8801cdd4d1e0 0000000000000008 0000000000000000 [ 34.877429] Call Trace: [ 34.877899] [] dump_stack+0xc1/0x128 [ 34.878926] [] print_address_description+0x6c/0x234 [ 34.879972] [] kasan_report.cold.6+0x242/0x2fe [ 34.880949] [] ? disk_unblock_events+0x51/0x60 [ 34.882049] [] __asan_report_load8_noabort+0x14/0x20 [ 34.883284] [] disk_unblock_events+0x51/0x60 [ 34.884110] [] __blkdev_get+0x6b6/0xd60 [ 34.885098] [] ? __blkdev_put+0x840/0x840 [ 34.885975] [] blkdev_get+0x2da/0x920 [ 34.886770] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 34.888039] [] ? bd_may_claim+0xd0/0xd0 [ 34.890819] [] ? bd_acquire+0xfc/0x250 [ 34.896389] [] ? bd_acquire+0x133/0x250 [ 34.902005] [] ? _raw_spin_unlock+0x2c/0x50 [ 34.907947] [] blkdev_open+0x1a5/0x250 [ 34.913462] [] do_dentry_open+0x3ef/0xc90 [ 34.919237] [] ? blkdev_get_by_dev+0x70/0x70 [ 34.925271] [] vfs_open+0x11c/0x210 [ 34.930526] [] ? may_open.isra.20+0x14f/0x2a0 [ 34.936650] [] path_openat+0x542/0x2790 [ 34.942256] [] ? path_mountpoint+0x6c0/0x6c0 [ 34.948331] [] ? trace_hardirqs_on+0x10/0x10 [ 34.954369] [] ? expand_files.part.3+0x3a9/0x6d0 [ 34.960755] [] do_filp_open+0x197/0x270 [ 34.966354] [] ? may_open_dev+0xe0/0xe0 [ 34.972021] [] ? _raw_spin_unlock+0x2c/0x50 [ 34.977973] [] ? __alloc_fd+0x1d7/0x4a0 [ 34.983633] [] do_sys_open+0x30d/0x5c0 [ 34.989153] [] ? filp_open+0x70/0x70 [ 34.994492] [] ? up_read+0x1a/0x40 [ 34.999699] [] ? loop_probe+0x180/0x180 [ 35.005312] [] compat_SyS_open+0x2a/0x40 [ 35.011081] [] ? compat_SyS_getdents64+0x280/0x280 [ 35.017640] [] do_fast_syscall_32+0x2f1/0xa10 [ 35.023762] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.030414] [] entry_SYSENTER_compat+0x90/0xa2 [ 35.036621] [ 35.038234] Allocated by task 2104: [ 35.041853] save_stack_trace+0x16/0x20 [ 35.045805] kasan_kmalloc.part.1+0x62/0xf0 [ 35.050168] kasan_kmalloc+0xaf/0xc0 [ 35.053933] kmem_cache_alloc_trace+0x117/0x2e0 [ 35.058582] alloc_disk_node+0x54/0x3a0 [ 35.062531] alloc_disk+0x18/0x20 [ 35.065964] loop_add+0x368/0x7a0 [ 35.069494] loop_control_ioctl+0x136/0x300 [ 35.073797] compat_SyS_ioctl+0x12d/0x1fd0 [ 35.078009] do_fast_syscall_32+0x2f1/0xa10 [ 35.082407] entry_SYSENTER_compat+0x90/0xa2 [ 35.086843] [ 35.088452] Freed by task 2104: [ 35.091707] save_stack_trace+0x16/0x20 [ 35.095655] kasan_slab_free+0xac/0x190 [ 35.099609] kfree+0xfb/0x310 [ 35.102690] disk_release+0x259/0x330 [ 35.106464] device_release+0x7e/0x220 [ 35.110326] kobject_put+0x148/0x250 [ 35.114013] put_disk+0x23/0x30 [ 35.117263] __blkdev_get+0x616/0xd60 [ 35.121117] blkdev_get+0x2da/0x920 [ 35.124722] blkdev_open+0x1a5/0x250 [ 35.128520] do_dentry_open+0x3ef/0xc90 [ 35.132500] vfs_open+0x11c/0x210 [ 35.135969] path_openat+0x542/0x2790 [ 35.139746] do_filp_open+0x197/0x270 [ 35.143517] do_sys_open+0x30d/0x5c0 [ 35.147333] compat_SyS_open+0x2a/0x40 [ 35.151218] do_fast_syscall_32+0x2f1/0xa10 [ 35.155530] entry_SYSENTER_compat+0x90/0xa2 [ 35.159914] [ 35.161516] The buggy address belongs to the object at ffff8801cdd4cc80 [ 35.161516] which belongs to the cache kmalloc-2048 of size 2048 [ 35.174376] The buggy address is located 1376 bytes inside of [ 35.174376] 2048-byte region [ffff8801cdd4cc80, ffff8801cdd4d480) [ 35.186404] The buggy address belongs to the page: [ 35.191449] page:ffffea0007375200 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 35.201814] flags: 0x4000000000004080(slab|head) [ 35.206547] page dumped because: kasan: bad access detected [ 35.212227] [ 35.213826] Memory state around the buggy address: [ 35.218732] ffff8801cdd4d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.226300] ffff8801cdd4d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.233639] >ffff8801cdd4d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.241234] ^ [ 35.247702] ffff8801cdd4d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.255039] ffff8801cdd4d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.262428] ================================================================== 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 [ 35.269768] Disabling lock debugging due to kernel taint [ 35.278823] Kernel panic - not syncing: panic_on_warn set ... [ 35.278823] [ 35.286188] CPU: 1 PID: 2104 Comm: syz-executor410 Tainted: G B 4.9.141+ #23 [ 35.294563] ffff8801cdc0f648 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 35.302588] 0000000000000000 0000000000000001 0000000000000000 ffff8801cdc0f708 [ 35.310702] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 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 [ 35.318687] Call Trace: [ 35.321250] [] dump_stack+0xc1/0x128 [ 35.326740] [] panic+0x1bf/0x39f [ 35.331799] [] ? add_taint.cold.5+0x16/0x16 [ 35.337756] [] ? ___preempt_schedule+0x16/0x18 [ 35.343971] [] kasan_end_report+0x47/0x4f [ 35.349743] [] kasan_report.cold.6+0x76/0x2fe [ 35.355927] [] ? disk_unblock_events+0x51/0x60 [ 35.362206] [] __asan_report_load8_noabort+0x14/0x20 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 [ 35.368942] [] disk_unblock_events+0x51/0x60 [ 35.374990] [] __blkdev_get+0x6b6/0xd60 [ 35.380606] [] ? __blkdev_put+0x840/0x840 [ 35.386394] [] blkdev_get+0x2da/0x920 [ 35.391824] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 35.398713] [] ? bd_may_claim+0xd0/0xd0 [ 35.404315] [] ? bd_acquire+0xfc/0x250 [ 35.409827] [] ? bd_acquire+0x133/0x250 [ 35.415465] [] ? _raw_spin_unlock+0x2c/0x50 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 [ 35.421413] [] blkdev_open+0x1a5/0x250 [ 35.426979] [] do_dentry_open+0x3ef/0xc90 [ 35.432757] [] ? blkdev_get_by_dev+0x70/0x70 [ 35.438797] [] vfs_open+0x11c/0x210 [ 35.444049] [] ? may_open.isra.20+0x14f/0x2a0 [ 35.450282] [] path_openat+0x542/0x2790 [ 35.457696] [] ? path_mountpoint+0x6c0/0x6c0 [ 35.463830] [] ? trace_hardirqs_on+0x10/0x10 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 [ 35.469868] [] ? expand_files.part.3+0x3a9/0x6d0 [ 35.476253] [] do_filp_open+0x197/0x270 [ 35.481855] [] ? may_open_dev+0xe0/0xe0 [ 35.487505] [] ? _raw_spin_unlock+0x2c/0x50 [ 35.493464] [] ? __alloc_fd+0x1d7/0x4a0 [ 35.499069] [] do_sys_open+0x30d/0x5c0 [ 35.504665] [] ? filp_open+0x70/0x70 [ 35.510061] [] ? up_read+0x1a/0x40 [ 35.515308] [] ? loop_probe+0x180/0x180 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 [ 35.520915] [] compat_SyS_open+0x2a/0x40 [ 35.526647] [] ? compat_SyS_getdents64+0x280/0x280 [ 35.533501] [] do_fast_syscall_32+0x2f1/0xa10 [ 35.539623] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.546281] [] entry_SYSENTER_compat+0x90/0xa2 [ 35.552726] Kernel Offset: disabled [ 35.556337] Rebooting in 86400 seconds..