[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [ 11.058376] 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: [ 30.262435] random: sshd: uninitialized urandom read (32 bytes read) [ 30.270490] random: crng init done Warning: Permanently added '10.128.0.87' (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 [ 37.571003] ================================================================== [ 37.578422] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 37.585164] Read of size 8 at addr ffff8801ce40da60 by task syz-executor764/2088 [ 37.592672] [ 37.594299] CPU: 1 PID: 2088 Comm: syz-executor764 Not tainted 4.9.141+ #1 [ 37.601300] ffff8801ce5976f8 ffffffff81b42e79 ffffea0007390200 ffff8801ce40da60 [ 37.609310] 0000000000000000 ffff8801ce40da60 0000000000000000 ffff8801ce597730 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.617408] ffffffff815009b8 ffff8801ce40da60 0000000000000008 0000000000000000 [ 37.625503] Call Trace: [ 37.628102] [] dump_stack+0xc1/0x128 [ 37.633495] [] print_address_description+0x6c/0x234 [ 37.640168] [] kasan_report.cold.6+0x242/0x2fe [ 37.646425] [] ? disk_unblock_events+0x51/0x60 [ 37.652870] [] __asan_report_load8_noabort+0x14/0x20 [ 37.659661] [] disk_unblock_events+0x51/0x60 [ 37.665748] [] __blkdev_get+0x6b6/0xd60 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.671378] [] ? __blkdev_put+0x840/0x840 [ 37.677191] [] blkdev_get+0x2da/0x920 [ 37.683270] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 37.690034] [] ? bd_may_claim+0xd0/0xd0 [ 37.695748] [] ? bd_acquire+0xfc/0x250 [ 37.701287] [] ? bd_acquire+0x133/0x250 [ 37.706913] [] ? _raw_spin_unlock+0x2c/0x50 [ 37.712884] [] blkdev_open+0x1a5/0x250 executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.718423] [] do_dentry_open+0x3ef/0xc90 [ 37.724226] [] ? blkdev_get_by_dev+0x70/0x70 [ 37.730289] [] vfs_open+0x11c/0x210 [ 37.735563] [] ? may_open.isra.20+0x14f/0x2a0 [ 37.741711] [] path_openat+0x542/0x2790 [ 37.747346] [] ? path_mountpoint+0x6c0/0x6c0 [ 37.753409] [] ? trace_hardirqs_on+0x10/0x10 [ 37.759468] [] ? expand_files.part.3+0x3a9/0x6d0 [ 37.765877] [] do_filp_open+0x197/0x270 executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.771539] [] ? may_open_dev+0xe0/0xe0 [ 37.777162] [] ? _raw_spin_unlock+0x2c/0x50 [ 37.783132] [] ? __alloc_fd+0x1d7/0x4a0 [ 37.788845] [] do_sys_open+0x30d/0x5c0 [ 37.794384] [] ? filp_open+0x70/0x70 [ 37.799752] [] ? up_read+0x1a/0x40 [ 37.804943] [] SyS_open+0x2d/0x40 [ 37.810056] [] ? do_sys_open+0x5c0/0x5c0 [ 37.815802] [] do_syscall_64+0x19f/0x550 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.821519] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 37.828440] [ 37.830068] Allocated by task 2088: [ 37.833693] save_stack_trace+0x16/0x20 [ 37.837666] kasan_kmalloc.part.1+0x62/0xf0 [ 37.841998] kasan_kmalloc+0xaf/0xc0 [ 37.845719] kmem_cache_alloc_trace+0x117/0x2e0 [ 37.850396] alloc_disk_node+0x54/0x3a0 [ 37.854372] alloc_disk+0x18/0x20 [ 37.857834] loop_add+0x368/0x7a0 [ 37.861289] loop_control_ioctl+0x136/0x300 [ 37.865613] do_vfs_ioctl+0x1ac/0x11a0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.869500] SyS_ioctl+0x8f/0xc0 [ 37.872865] do_syscall_64+0x19f/0x550 [ 37.876753] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 37.881851] [ 37.883476] Freed by task 2088: [ 37.888221] save_stack_trace+0x16/0x20 [ 37.892197] kasan_slab_free+0xac/0x190 [ 37.896188] kfree+0xfb/0x310 [ 37.899338] disk_release+0x259/0x330 [ 37.903145] device_release+0x7e/0x220 [ 37.907040] kobject_put+0x148/0x250 [ 37.910756] put_disk+0x23/0x30 [ 37.914041] __blkdev_get+0x616/0xd60 [ 37.917840] blkdev_get+0x2da/0x920 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.921467] blkdev_open+0x1a5/0x250 [ 37.925180] do_dentry_open+0x3ef/0xc90 [ 37.929163] vfs_open+0x11c/0x210 [ 37.932613] path_openat+0x542/0x2790 [ 37.936412] do_filp_open+0x197/0x270 [ 37.940221] do_sys_open+0x30d/0x5c0 [ 37.943937] SyS_open+0x2d/0x40 [ 37.947222] do_syscall_64+0x19f/0x550 [ 37.951113] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 37.956217] [ 37.957845] The buggy address belongs to the object at ffff8801ce40d500 [ 37.957845] which belongs to the cache kmalloc-2048 of size 2048 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 37.970683] The buggy address is located 1376 bytes inside of [ 37.970683] 2048-byte region [ffff8801ce40d500, ffff8801ce40dd00) [ 37.982728] The buggy address belongs to the page: [ 37.987656] page:ffffea0007390200 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 37.997904] flags: 0x4000000000004080(slab|head) [ 38.002733] page dumped because: kasan: bad access detected [ 38.008440] [ 38.010058] Memory state around the buggy address: [ 38.015077] ffff8801ce40d900: 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 38.022435] ffff8801ce40d980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.029792] >ffff8801ce40da00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.037378] ^ [ 38.044068] ffff8801ce40da80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.051513] ffff8801ce40db00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.058869] ================================================================== [ 38.066236] Disabling lock debugging due to kernel taint executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 38.077440] Kernel panic - not syncing: panic_on_warn set ... [ 38.077440] [ 38.084843] CPU: 0 PID: 2088 Comm: syz-executor764 Tainted: G B 4.9.141+ #1 [ 38.093067] ffff8801ce597658 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 38.101291] 0000000000000000 0000000000000000 0000000000000000 ffff8801ce597718 [ 38.109372] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 [ 38.117547] Call Trace: [ 38.120137] [] dump_stack+0xc1/0x128 [ 38.125499] [] panic+0x1bf/0x39f [ 38.130527] [] ? add_taint.cold.5+0x16/0x16 [ 38.136492] [] ? ___preempt_schedule+0x16/0x18 [ 38.142721] [] kasan_end_report+0x47/0x4f [ 38.148517] [] kasan_report.cold.6+0x76/0x2fe [ 38.154653] [] ? disk_unblock_events+0x51/0x60 [ 38.160878] [] __asan_report_load8_noabort+0x14/0x20 [ 38.167646] [] disk_unblock_events+0x51/0x60 [ 38.173699] [] __blkdev_get+0x6b6/0xd60 [ 38.179305] [] ? __blkdev_put+0x840/0x840 [ 38.185177] [] blkdev_get+0x2da/0x920 [ 38.190635] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 38.197388] [] ? bd_may_claim+0xd0/0xd0 [ 38.203010] [] ? bd_acquire+0xfc/0x250 [ 38.208565] [] ? bd_acquire+0x133/0x250 [ 38.214181] [] ? _raw_spin_unlock+0x2c/0x50 [ 38.220155] [] blkdev_open+0x1a5/0x250 [ 38.225693] [] do_dentry_open+0x3ef/0xc90 [ 38.231482] [] ? blkdev_get_by_dev+0x70/0x70 [ 38.237543] [] vfs_open+0x11c/0x210 [ 38.242814] [] ? may_open.isra.20+0x14f/0x2a0 [ 38.248968] [] path_openat+0x542/0x2790 [ 38.254624] [] ? path_mountpoint+0x6c0/0x6c0 [ 38.260683] [] ? trace_hardirqs_on+0x10/0x10 [ 38.266731] [] ? expand_files.part.3+0x3a9/0x6d0 [ 38.273127] [] do_filp_open+0x197/0x270 [ 38.278738] [] ? may_open_dev+0xe0/0xe0 [ 38.284694] [] ? _raw_spin_unlock+0x2c/0x50 [ 38.290659] [] ? __alloc_fd+0x1d7/0x4a0 [ 38.296266] [] do_sys_open+0x30d/0x5c0 [ 38.301793] [] ? filp_open+0x70/0x70 [ 38.307186] [] ? up_read+0x1a/0x40 [ 38.312385] [] SyS_open+0x2d/0x40 [ 38.317502] [] ? do_sys_open+0x5c0/0x5c0 [ 38.323235] [] do_syscall_64+0x19f/0x550 [ 38.328948] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.336274] Kernel Offset: disabled [ 38.339895] Rebooting in 86400 seconds..