[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [ 11.410313] random: crng init done [....] 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.251' (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 syzkaller login: [ 42.473897] ================================================================== [ 42.475692] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 42.476880] Read of size 8 at addr ffff8801cf1cc960 by task syz-executor240/2082 [ 42.478204] [ 42.478668] CPU: 1 PID: 2082 Comm: syz-executor240 Not tainted 4.9.141+ #23 [ 42.480010] ffff8801ce6b76e8 ffffffff81b42e79 ffffea00073c7200 ffff8801cf1cc960 [ 42.482064] 0000000000000000 ffff8801cf1cc960 0000000000000000 ffff8801ce6b7720 [ 42.484060] ffffffff815009b8 ffff8801cf1cc960 0000000000000008 0000000000000000 [ 42.486332] Call Trace: [ 42.487030] [] dump_stack+0xc1/0x128 [ 42.488486] [] print_address_description+0x6c/0x234 [ 42.490305] [] kasan_report.cold.6+0x242/0x2fe [ 42.491792] [] ? disk_unblock_events+0x51/0x60 [ 42.493366] [] __asan_report_load8_noabort+0x14/0x20 [ 42.498633] [] disk_unblock_events+0x51/0x60 [ 42.504976] [] __blkdev_get+0x6b6/0xd60 [ 42.510608] [] ? __blkdev_put+0x840/0x840 [ 42.516413] [] blkdev_get+0x2da/0x920 executing program executing program executing program executing program [ 42.521873] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 42.528684] [] ? bd_may_claim+0xd0/0xd0 [ 42.534323] [] ? bd_acquire+0xfc/0x250 [ 42.539878] [] ? bd_acquire+0x133/0x250 [ 42.545535] [] ? _raw_spin_unlock+0x2c/0x50 [ 42.552061] [] blkdev_open+0x1a5/0x250 [ 42.557605] [] do_dentry_open+0x3ef/0xc90 [ 42.563408] [] ? blkdev_get_by_dev+0x70/0x70 executing program [ 42.569565] [] vfs_open+0x11c/0x210 [ 42.574885] [] ? may_open.isra.20+0x14f/0x2a0 [ 42.581038] [] path_openat+0x542/0x2790 [ 42.586672] [] ? path_mountpoint+0x6c0/0x6c0 [ 42.592825] [] ? trace_hardirqs_on+0x10/0x10 [ 42.598912] [] ? expand_files.part.3+0x3a9/0x6d0 [ 42.605333] [] do_filp_open+0x197/0x270 [ 42.610964] [] ? may_open_dev+0xe0/0xe0 [ 42.616769] [] ? _raw_spin_unlock+0x2c/0x50 [ 42.622768] [] ? __alloc_fd+0x1d7/0x4a0 [ 42.628403] [] do_sys_open+0x30d/0x5c0 [ 42.633950] [] ? filp_open+0x70/0x70 [ 42.639323] [] ? up_read+0x1a/0x40 [ 42.644603] [] ? loop_probe+0x180/0x180 [ 42.650231] [] compat_SyS_open+0x2a/0x40 [ 42.656009] [] ? compat_SyS_getdents64+0x280/0x280 [ 42.662593] [] do_fast_syscall_32+0x2f1/0xa10 [ 42.668741] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.675420] [] entry_SYSENTER_compat+0x90/0xa2 [ 42.681739] [ 42.683368] Allocated by task 2082: [ 42.686996] save_stack_trace+0x16/0x20 [ 42.691581] kasan_kmalloc.part.1+0x62/0xf0 [ 42.695919] kasan_kmalloc+0xaf/0xc0 [ 42.699642] kmem_cache_alloc_trace+0x117/0x2e0 [ 42.704315] alloc_disk_node+0x54/0x3a0 [ 42.708468] alloc_disk+0x18/0x20 [ 42.712011] loop_add+0x368/0x7a0 [ 42.715925] loop_control_ioctl+0x136/0x300 [ 42.720263] compat_SyS_ioctl+0x12d/0x1fd0 [ 42.724496] do_fast_syscall_32+0x2f1/0xa10 [ 42.728829] entry_SYSENTER_compat+0x90/0xa2 [ 42.733223] [ 42.734851] Freed by task 2082: [ 42.738133] save_stack_trace+0x16/0x20 [ 42.742109] kasan_slab_free+0xac/0x190 [ 42.746080] kfree+0xfb/0x310 [ 42.749192] disk_release+0x259/0x330 [ 42.753030] device_release+0x7e/0x220 [ 42.756925] kobject_put+0x148/0x250 [ 42.760659] put_disk+0x23/0x30 [ 42.763946] __blkdev_get+0x616/0xd60 [ 42.767751] blkdev_get+0x2da/0x920 [ 42.771377] blkdev_open+0x1a5/0x250 [ 42.775097] do_dentry_open+0x3ef/0xc90 [ 42.779093] vfs_open+0x11c/0x210 [ 42.782547] path_openat+0x542/0x2790 [ 42.786348] do_filp_open+0x197/0x270 [ 42.790146] do_sys_open+0x30d/0x5c0 [ 42.793862] compat_SyS_open+0x2a/0x40 [ 42.797753] do_fast_syscall_32+0x2f1/0xa10 [ 42.802075] entry_SYSENTER_compat+0x90/0xa2 [ 42.806476] [ 42.808102] The buggy address belongs to the object at ffff8801cf1cc400 [ 42.808102] which belongs to the cache kmalloc-2048 of size 2048 [ 42.820939] The buggy address is located 1376 bytes inside of [ 42.820939] 2048-byte region [ffff8801cf1cc400, ffff8801cf1ccc00) [ 42.832991] The buggy address belongs to the page: [ 42.837918] page:ffffea00073c7200 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 42.848167] flags: 0x4000000000004080(slab|head) [ 42.852916] page dumped because: kasan: bad access detected [ 42.858627] [ 42.860246] Memory state around the buggy address: [ 42.865176] ffff8801cf1cc800: 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 42.872707] ffff8801cf1cc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.880071] >ffff8801cf1cc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.887430] ^ [ 42.893924] ffff8801cf1cc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.901291] ffff8801cf1cca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.908644] ================================================================== [ 42.916154] 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 42.929158] Kernel panic - not syncing: panic_on_warn set ... [ 42.929158] [ 42.936560] CPU: 1 PID: 2082 Comm: syz-executor240 Tainted: G B 4.9.141+ #23 [ 42.944873] ffff8801ce6b7648 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 42.952957] 0000000000000000 0000000000000001 0000000000000000 ffff8801ce6b7708 [ 42.961080] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 [ 42.969186] Call Trace: [ 42.971779] [] dump_stack+0xc1/0x128 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 42.977147] [] panic+0x1bf/0x39f [ 42.982168] [] ? add_taint.cold.5+0x16/0x16 [ 42.988142] [] ? ___preempt_schedule+0x16/0x18 [ 42.994379] [] kasan_end_report+0x47/0x4f [ 43.000181] [] kasan_report.cold.6+0x76/0x2fe [ 43.006328] [] ? disk_unblock_events+0x51/0x60 [ 43.012565] [] __asan_report_load8_noabort+0x14/0x20 [ 43.019327] [] disk_unblock_events+0x51/0x60 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 43.025420] [] __blkdev_get+0x6b6/0xd60 [ 43.031057] [] ? __blkdev_put+0x840/0x840 [ 43.037205] [] blkdev_get+0x2da/0x920 [ 43.042836] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 43.049598] [] ? bd_may_claim+0xd0/0xd0 [ 43.055234] [] ? bd_acquire+0xfc/0x250 [ 43.060773] [] ? bd_acquire+0x133/0x250 [ 43.066433] [] ? _raw_spin_unlock+0x2c/0x50 [ 43.072425] [] 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 executing program executing program executing program [ 43.078003] [] do_dentry_open+0x3ef/0xc90 [ 43.083810] [] ? blkdev_get_by_dev+0x70/0x70 [ 43.089870] [] vfs_open+0x11c/0x210 [ 43.095164] [] ? may_open.isra.20+0x14f/0x2a0 [ 43.101312] [] path_openat+0x542/0x2790 [ 43.106989] [] ? path_mountpoint+0x6c0/0x6c0 [ 43.113066] [] ? trace_hardirqs_on+0x10/0x10 [ 43.119131] [] ? expand_files.part.3+0x3a9/0x6d0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 43.125631] [] do_filp_open+0x197/0x270 [ 43.131265] [] ? may_open_dev+0xe0/0xe0 [ 43.136900] [] ? _raw_spin_unlock+0x2c/0x50 [ 43.142965] [] ? __alloc_fd+0x1d7/0x4a0 [ 43.148600] [] do_sys_open+0x30d/0x5c0 [ 43.154144] [] ? filp_open+0x70/0x70 [ 43.159510] [] ? up_read+0x1a/0x40 [ 43.164812] [] ? loop_probe+0x180/0x180 [ 43.170439] [] compat_SyS_open+0x2a/0x40 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 43.176251] [] ? compat_SyS_getdents64+0x280/0x280 [ 43.182832] [] do_fast_syscall_32+0x2f1/0xa10 [ 43.188980] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 43.195658] [] entry_SYSENTER_compat+0x90/0xa2 [ 43.202315] Kernel Offset: disabled [ 43.206183] Rebooting in 86400 seconds..