[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [ 10.203576] random: sshd: uninitialized urandom read (32 bytes read) [....] 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: [ 26.285163] random: crng init done Warning: Permanently added '10.128.0.29' (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 [ 40.849741] ================================================================== [ 40.857134] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 40.864036] Read of size 8 at addr ffff8801c9f85a60 by task syz-executor904/2285 [ 40.871617] [ 40.873229] CPU: 1 PID: 2285 Comm: syz-executor904 Not tainted 4.9.141+ #23 [ 40.880310] ffff8801ca65f6e8 ffffffff81b42e79 ffffea000727e000 ffff8801c9f85a60 [ 40.888387] 0000000000000000 ffff8801c9f85a60 0000000000000000 ffff8801ca65f720 [ 40.896458] ffffffff815009b8 ffff8801c9f85a60 0000000000000008 0000000000000000 [ 40.904520] Call Trace: [ 40.907108] [] dump_stack+0xc1/0x128 [ 40.912478] [] print_address_description+0x6c/0x234 [ 40.919145] [] kasan_report.cold.6+0x242/0x2fe [ 40.925376] [] ? disk_unblock_events+0x51/0x60 [ 40.931607] [] __asan_report_load8_noabort+0x14/0x20 [ 40.938361] [] disk_unblock_events+0x51/0x60 [ 40.944419] [] __blkdev_get+0x6b6/0xd60 [ 40.950054] [] ? __blkdev_put+0x840/0x840 [ 40.955848] [] ? fsnotify+0x114/0x1100 [ 40.961386] [] blkdev_get+0x2da/0x920 [ 40.966839] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 40.973591] [] ? bd_may_claim+0xd0/0xd0 [ 40.979206] [] ? bd_acquire+0x27/0x250 [ 40.984737] [] ? bd_acquire+0x88/0x250 [ 40.990277] [] ? _raw_spin_unlock+0x2c/0x50 [ 40.996250] [] blkdev_open+0x1a5/0x250 [ 41.001794] [] do_dentry_open+0x3ef/0xc90 [ 41.007588] [] ? blkdev_get_by_dev+0x70/0x70 [ 41.013647] [] vfs_open+0x11c/0x210 [ 41.018922] [] ? may_open.isra.20+0x14f/0x2a0 [ 41.025070] [] path_openat+0x542/0x2790 [ 41.030693] [] ? path_mountpoint+0x6c0/0x6c0 [ 41.036751] [] ? trace_hardirqs_on+0x10/0x10 [ 41.042806] [] ? expand_files.part.3+0x3a9/0x6d0 [ 41.049213] [] do_filp_open+0x197/0x270 [ 41.054838] [] ? may_open_dev+0xe0/0xe0 [ 41.060462] [] ? _raw_spin_unlock+0x2c/0x50 [ 41.066434] [] ? __alloc_fd+0x1d7/0x4a0 [ 41.072059] [] do_sys_open+0x30d/0x5c0 [ 41.077595] [] ? filp_open+0x70/0x70 [ 41.082958] [] ? up_read+0x1a/0x40 [ 41.088158] [] ? loop_probe+0x180/0x180 [ 41.093790] [] compat_SyS_open+0x2a/0x40 [ 41.099495] [] ? compat_SyS_getdents64+0x280/0x280 [ 41.106072] [] do_fast_syscall_32+0x2f1/0xa10 [ 41.112220] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.118890] [] entry_SYSENTER_compat+0x90/0xa2 [ 41.125117] [ 41.126747] Allocated by task 2285: [ 41.130375] save_stack_trace+0x16/0x20 [ 41.134343] kasan_kmalloc.part.1+0x62/0xf0 [ 41.138662] kasan_kmalloc+0xaf/0xc0 [ 41.142381] kmem_cache_alloc_trace+0x117/0x2e0 [ 41.147064] alloc_disk_node+0x54/0x3a0 [ 41.151039] alloc_disk+0x18/0x20 [ 41.154487] loop_add+0x368/0x7a0 [ 41.157936] loop_control_ioctl+0x136/0x300 [ 41.162252] compat_SyS_ioctl+0x12d/0x1fd0 [ 41.166487] do_fast_syscall_32+0x2f1/0xa10 [ 41.170806] entry_SYSENTER_compat+0x90/0xa2 [ 41.175202] [ 41.176833] Freed by task 2285: [ 41.180108] save_stack_trace+0x16/0x20 [ 41.184080] kasan_slab_free+0xac/0x190 [ 41.188060] kfree+0xfb/0x310 [ 41.191160] disk_release+0x259/0x330 [ 41.194961] device_release+0x7e/0x220 [ 41.198929] kobject_put+0x148/0x250 [ 41.202644] put_disk+0x23/0x30 [ 41.205917] __blkdev_get+0x616/0xd60 [ 41.209716] blkdev_get+0x2da/0x920 [ 41.213350] blkdev_open+0x1a5/0x250 [ 41.217067] do_dentry_open+0x3ef/0xc90 [ 41.221043] vfs_open+0x11c/0x210 [ 41.224493] path_openat+0x542/0x2790 [ 41.228288] do_filp_open+0x197/0x270 [ 41.232082] do_sys_open+0x30d/0x5c0 [ 41.235798] compat_SyS_open+0x2a/0x40 [ 41.239683] do_fast_syscall_32+0x2f1/0xa10 [ 41.244001] entry_SYSENTER_compat+0x90/0xa2 [ 41.248412] [ 41.250048] The buggy address belongs to the object at ffff8801c9f85500 [ 41.250048] which belongs to the cache kmalloc-2048 of size 2048 [ 41.262982] The buggy address is located 1376 bytes inside of [ 41.262982] 2048-byte region [ffff8801c9f85500, ffff8801c9f85d00) [ 41.275117] The buggy address belongs to the page: [ 41.280159] page:ffffea000727e000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 41.290383] flags: 0x4000000000004080(slab|head) [ 41.295125] page dumped because: kasan: bad access detected [ 41.300823] [ 41.302438] Memory state around the buggy address: [ 41.307362] ffff8801c9f85900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.314719] ffff8801c9f85980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.322070] >ffff8801c9f85a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.329421] ^ [ 41.335931] ffff8801c9f85a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.343288] ffff8801c9f85b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program executing program executing program executing program executing program executing program executing program [ 41.350636] ================================================================== [ 41.357987] Disabling lock debugging due to kernel taint [ 41.366857] Kernel panic - not syncing: panic_on_warn set ... [ 41.366857] [ 41.374235] CPU: 1 PID: 2285 Comm: syz-executor904 Tainted: G B 4.9.141+ #23 [ 41.382551] ffff8801ca65f648 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 41.390632] 0000000000000000 0000000000000001 0000000000000000 ffff8801ca65f708 executing program executing program executing program executing program executing program executing program [ 41.398788] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 [ 41.406847] Call Trace: [ 41.409436] [] dump_stack+0xc1/0x128 [ 41.414795] [] panic+0x1bf/0x39f [ 41.419819] [] ? add_taint.cold.5+0x16/0x16 [ 41.425804] [] ? ___preempt_schedule+0x16/0x18 [ 41.432043] [] kasan_end_report+0x47/0x4f [ 41.437842] [] kasan_report.cold.6+0x76/0x2fe [ 41.443996] [] ? disk_unblock_events+0x51/0x60 [ 41.450266] [] __asan_report_load8_noabort+0x14/0x20 [ 41.457029] [] disk_unblock_events+0x51/0x60 [ 41.463087] [] __blkdev_get+0x6b6/0xd60 [ 41.468704] [] ? __blkdev_put+0x840/0x840 [ 41.474502] [] ? fsnotify+0x114/0x1100 [ 41.480042] [] blkdev_get+0x2da/0x920 [ 41.485590] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.492338] [] ? bd_may_claim+0xd0/0xd0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 41.497957] [] ? bd_acquire+0x27/0x250 [ 41.503491] [] ? bd_acquire+0x88/0x250 [ 41.509035] [] ? _raw_spin_unlock+0x2c/0x50 [ 41.515002] [] blkdev_open+0x1a5/0x250 [ 41.520548] [] do_dentry_open+0x3ef/0xc90 [ 41.526341] [] ? blkdev_get_by_dev+0x70/0x70 [ 41.532399] [] vfs_open+0x11c/0x210 [ 41.537675] [] ? may_open.isra.20+0x14f/0x2a0 [ 41.543814] [] path_openat+0x542/0x2790 [ 41.549440] [] ? path_mountpoint+0x6c0/0x6c0 [ 41.555493] [] ? trace_hardirqs_on+0x10/0x10 [ 41.561556] [] ? expand_files.part.3+0x3a9/0x6d0 [ 41.567960] [] do_filp_open+0x197/0x270 [ 41.573581] [] ? may_open_dev+0xe0/0xe0 [ 41.579205] [] ? _raw_spin_unlock+0x2c/0x50 [ 41.585169] [] ? __alloc_fd+0x1d7/0x4a0 [ 41.590794] [] do_sys_open+0x30d/0x5c0 [ 41.596328] [] ? filp_open+0x70/0x70 [ 41.601693] [] ? up_read+0x1a/0x40 [ 41.606881] [] ? loop_probe+0x180/0x180 [ 41.612502] [] compat_SyS_open+0x2a/0x40 [ 41.618215] [] ? compat_SyS_getdents64+0x280/0x280 [ 41.624789] [] do_fast_syscall_32+0x2f1/0xa10 [ 41.630937] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.637618] [] entry_SYSENTER_compat+0x90/0xa2 [ 41.644357] Kernel Offset: disabled [ 41.647969] Rebooting in 86400 seconds..