[....] 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[ 12.838935] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 13.960899] random: crng init done Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.102' (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 syzkaller login: [ 45.457370] ================================================================== [ 45.464869] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 45.471621] Read of size 8 at addr ffff8801c9101660 by task syz-executor378/2169 [ 45.479146] [ 45.480774] CPU: 0 PID: 2169 Comm: syz-executor378 Not tainted 4.9.141+ #23 [ 45.487883] ffff8801cccbf6e8 ffffffff81b42e79 ffffea0007244000 ffff8801c9101660 [ 45.495958] 0000000000000000 ffff8801c9101660 0000000000000000 ffff8801cccbf720 [ 45.504038] ffffffff815009b8 ffff8801c9101660 0000000000000008 0000000000000000 [ 45.512106] Call Trace: [ 45.514704] [] dump_stack+0xc1/0x128 [ 45.520089] [] print_address_description+0x6c/0x234 [ 45.526757] [] kasan_report.cold.6+0x242/0x2fe [ 45.532991] [] ? disk_unblock_events+0x51/0x60 [ 45.539220] [] __asan_report_load8_noabort+0x14/0x20 [ 45.545980] [] disk_unblock_events+0x51/0x60 [ 45.552051] [] __blkdev_get+0x6b6/0xd60 [ 45.557676] [] ? __blkdev_put+0x840/0x840 [ 45.563482] [] ? __sanitizer_cov_trace_pc+0x4c/0x50 [ 45.570150] [] ? fsnotify+0x114/0x1100 [ 45.575684] [] blkdev_get+0x2da/0x920 [ 45.581154] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 45.587908] [] ? bd_may_claim+0xd0/0xd0 [ 45.593535] [] ? bd_acquire+0x27/0x250 [ 45.599073] [] ? bd_acquire+0x88/0x250 [ 45.604632] [] ? _raw_spin_unlock+0x2c/0x50 [ 45.610599] [] blkdev_open+0x1a5/0x250 [ 45.616151] [] do_dentry_open+0x3ef/0xc90 [ 45.621944] [] ? blkdev_get_by_dev+0x70/0x70 [ 45.627998] [] vfs_open+0x11c/0x210 [ 45.633281] [] ? may_open.isra.20+0x14f/0x2a0 [ 45.639429] [] path_openat+0x542/0x2790 [ 45.645055] [] ? path_mountpoint+0x6c0/0x6c0 [ 45.651121] [] ? trace_hardirqs_on+0x10/0x10 [ 45.657193] [] ? __schedule+0x66a/0x1b10 [ 45.662904] [] ? expand_files.part.3+0x3a9/0x6d0 [ 45.669311] [] do_filp_open+0x197/0x270 [ 45.674940] [] ? may_open_dev+0xe0/0xe0 [ 45.680563] [] ? _raw_spin_unlock+0x2c/0x50 [ 45.686536] [] ? __alloc_fd+0x1d7/0x4a0 [ 45.692245] [] do_sys_open+0x30d/0x5c0 [ 45.697791] [] ? filp_open+0x70/0x70 [ 45.703153] [] ? up_read+0x1a/0x40 [ 45.708359] [] ? loop_probe+0x180/0x180 [ 45.713996] [] compat_SyS_open+0x2a/0x40 [ 45.719707] [] ? compat_SyS_getdents64+0x280/0x280 [ 45.726301] [] do_fast_syscall_32+0x2f1/0xa10 [ 45.732451] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 45.739117] [] entry_SYSENTER_compat+0x90/0xa2 [ 45.745336] [ 45.746961] Allocated by task 2167: [ 45.750609] save_stack_trace+0x16/0x20 [ 45.754581] kasan_kmalloc.part.1+0x62/0xf0 [ 45.758901] kasan_kmalloc+0xaf/0xc0 [ 45.762611] kmem_cache_alloc_trace+0x117/0x2e0 [ 45.767279] alloc_disk_node+0x54/0x3a0 [ 45.771249] alloc_disk+0x18/0x20 [ 45.774701] loop_add+0x368/0x7a0 [ 45.778158] loop_control_ioctl+0x136/0x300 [ 45.782475] compat_SyS_ioctl+0x12d/0x1fd0 [ 45.786704] do_fast_syscall_32+0x2f1/0xa10 [ 45.791032] entry_SYSENTER_compat+0x90/0xa2 [ 45.795433] [ 45.797087] Freed by task 2169: [ 45.800361] save_stack_trace+0x16/0x20 [ 45.804337] kasan_slab_free+0xac/0x190 [ 45.808311] kfree+0xfb/0x310 [ 45.811423] disk_release+0x259/0x330 [ 45.815224] device_release+0x7e/0x220 [ 45.819106] kobject_put+0x148/0x250 [ 45.822816] put_disk+0x23/0x30 [ 45.826095] __blkdev_get+0x616/0xd60 [ 45.829891] blkdev_get+0x2da/0x920 [ 45.833515] blkdev_open+0x1a5/0x250 [ 45.837223] do_dentry_open+0x3ef/0xc90 [ 45.841193] vfs_open+0x11c/0x210 [ 45.844641] path_openat+0x542/0x2790 [ 45.848439] do_filp_open+0x197/0x270 [ 45.852239] do_sys_open+0x30d/0x5c0 executing program executing program executing program executing program executing program [ 45.855951] compat_SyS_open+0x2a/0x40 [ 45.859840] do_fast_syscall_32+0x2f1/0xa10 [ 45.864161] entry_SYSENTER_compat+0x90/0xa2 [ 45.868574] [ 45.870196] The buggy address belongs to the object at ffff8801c9101100 [ 45.870196] which belongs to the cache kmalloc-2048 of size 2048 [ 45.883026] The buggy address is located 1376 bytes inside of [ 45.883026] 2048-byte region [ffff8801c9101100, ffff8801c9101900) [ 45.895062] The buggy address belongs to the page: executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 45.899996] page:ffffea0007244000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 45.910229] flags: 0x4000000000004080(slab|head) [ 45.914986] page dumped because: kasan: bad access detected [ 45.920691] [ 45.922315] Memory state around the buggy address: [ 45.927239] ffff8801c9101500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.934592] ffff8801c9101580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.941946] >ffff8801c9101600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.949296] ^ executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 45.955779] ffff8801c9101680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.963137] ffff8801c9101700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.970486] ================================================================== [ 45.977844] Disabling lock debugging due to kernel taint [ 45.988267] Kernel panic - not syncing: panic_on_warn set ... [ 45.988267] [ 45.995644] CPU: 0 PID: 2169 Comm: syz-executor378 Tainted: G B 4.9.141+ #23 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 46.003951] ffff8801cccbf648 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 46.012051] 0000000000000000 0000000000000000 0000000000000000 ffff8801cccbf708 [ 46.020156] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 [ 46.028249] Call Trace: [ 46.030839] [] dump_stack+0xc1/0x128 [ 46.036204] [] panic+0x1bf/0x39f [ 46.041218] [] ? add_taint.cold.5+0x16/0x16 [ 46.047187] [] ? ___preempt_schedule+0x16/0x18 [ 46.053419] [] kasan_end_report+0x47/0x4f executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 46.059225] [] kasan_report.cold.6+0x76/0x2fe [ 46.065374] [] ? disk_unblock_events+0x51/0x60 [ 46.071605] [] __asan_report_load8_noabort+0x14/0x20 [ 46.078357] [] disk_unblock_events+0x51/0x60 [ 46.084412] [] __blkdev_get+0x6b6/0xd60 [ 46.090039] [] ? __blkdev_put+0x840/0x840 [ 46.095837] [] ? __sanitizer_cov_trace_pc+0x4c/0x50 [ 46.102500] [] ? fsnotify+0x114/0x1100 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 46.108040] [] blkdev_get+0x2da/0x920 [ 46.113490] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 46.128581] [] ? bd_may_claim+0xd0/0xd0 [ 46.134235] [] ? bd_acquire+0x27/0x250 [ 46.139773] [] ? bd_acquire+0x88/0x250 [ 46.145308] [] ? _raw_spin_unlock+0x2c/0x50 [ 46.151280] [] blkdev_open+0x1a5/0x250 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 46.156821] [] do_dentry_open+0x3ef/0xc90 [ 46.162628] [] ? blkdev_get_by_dev+0x70/0x70 [ 46.168684] [] vfs_open+0x11c/0x210 [ 46.174005] [] ? may_open.isra.20+0x14f/0x2a0 [ 46.181610] [] path_openat+0x542/0x2790 [ 46.187235] [] ? path_mountpoint+0x6c0/0x6c0 [ 46.193297] [] ? trace_hardirqs_on+0x10/0x10 [ 46.199358] [] ? __schedule+0x66a/0x1b10 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 46.205069] [] ? expand_files.part.3+0x3a9/0x6d0 [ 46.211476] [] do_filp_open+0x197/0x270 [ 46.217096] [] ? may_open_dev+0xe0/0xe0 [ 46.222752] [] ? _raw_spin_unlock+0x2c/0x50 [ 46.228730] [] ? __alloc_fd+0x1d7/0x4a0 [ 46.234358] [] do_sys_open+0x30d/0x5c0 [ 46.239984] [] ? filp_open+0x70/0x70 [ 46.245349] [] ? up_read+0x1a/0x40 [ 46.250539] [] ? 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 executing program [ 46.256199] [] compat_SyS_open+0x2a/0x40 [ 46.262087] [] ? compat_SyS_getdents64+0x280/0x280 [ 46.268666] [] do_fast_syscall_32+0x2f1/0xa10 [ 46.274810] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 46.281478] [] entry_SYSENTER_compat+0x90/0xa2 [ 46.288098] Kernel Offset: disabled [ 46.291709] Rebooting in 86400 seconds..