[ 11.210873] audit: type=1400 audit(1551295753.097:4): avc: denied { syslog } for pid=1913 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] 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[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.66' (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 syzkaller login: [ 36.276422] ================================================================== [ 36.283835] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 36.290569] Read of size 8 at addr ffff8801cd5d2760 by task syz-executor070/2105 [ 36.298087] [ 36.299729] CPU: 1 PID: 2105 Comm: syz-executor070 Not tainted 4.9.141+ #23 [ 36.306831] ffff8801cdfb76e8 ffffffff81b42e79 ffffea0007357400 ffff8801cd5d2760 [ 36.314917] 0000000000000000 ffff8801cd5d2760 0000000000000000 ffff8801cdfb7720 [ 36.323018] ffffffff815009b8 ffff8801cd5d2760 0000000000000008 0000000000000000 [ 36.331097] Call Trace: [ 36.333684] [] dump_stack+0xc1/0x128 [ 36.339047] [] print_address_description+0x6c/0x234 [ 36.345724] [] kasan_report.cold.6+0x242/0x2fe [ 36.351968] [] ? disk_unblock_events+0x51/0x60 [ 36.358193] [] __asan_report_load8_noabort+0x14/0x20 [ 36.364944] [] disk_unblock_events+0x51/0x60 [ 36.370997] [] __blkdev_get+0x6b6/0xd60 [ 36.376620] [] ? __blkdev_put+0x840/0x840 [ 36.382436] [] blkdev_get+0x2da/0x920 [ 36.387911] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 36.394663] [] ? bd_may_claim+0xd0/0xd0 [ 36.400294] [] ? bd_acquire+0xfc/0x250 [ 36.405826] [] ? bd_acquire+0x133/0x250 [ 36.411453] [] ? _raw_spin_unlock+0x2c/0x50 [ 36.417424] [] blkdev_open+0x1a5/0x250 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.422968] [] do_dentry_open+0x3ef/0xc90 [ 36.428770] [] ? blkdev_get_by_dev+0x70/0x70 [ 36.434830] [] vfs_open+0x11c/0x210 [ 36.440101] [] ? may_open.isra.20+0x14f/0x2a0 [ 36.446264] [] path_openat+0x542/0x2790 [ 36.451885] [] ? path_mountpoint+0x6c0/0x6c0 [ 36.457938] [] ? trace_hardirqs_on+0x10/0x10 [ 36.463993] [] ? expand_files.part.3+0x3a9/0x6d0 [ 36.470392] [] do_filp_open+0x197/0x270 [ 36.476016] [] ? may_open_dev+0xe0/0xe0 [ 36.481636] [] ? _raw_spin_unlock+0x2c/0x50 [ 36.487601] [] ? __alloc_fd+0x1d7/0x4a0 [ 36.493221] [] do_sys_open+0x30d/0x5c0 [ 36.498771] [] ? filp_open+0x70/0x70 [ 36.504129] [] ? up_read+0x1a/0x40 [ 36.509314] [] ? move_addr_to_kernel+0x50/0x50 [ 36.515541] [] compat_SyS_open+0x2a/0x40 [ 36.521246] [] ? compat_SyS_getdents64+0x280/0x280 [ 36.527821] [] do_fast_syscall_32+0x2f1/0xa10 [ 36.533959] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 36.540628] [] entry_SYSENTER_compat+0x90/0xa2 [ 36.546845] [ 36.548471] Allocated by task 2105: [ 36.552095] save_stack_trace+0x16/0x20 [ 36.556064] kasan_kmalloc.part.1+0x62/0xf0 [ 36.560387] kasan_kmalloc+0xaf/0xc0 [ 36.564091] kmem_cache_alloc_trace+0x117/0x2e0 [ 36.568761] alloc_disk_node+0x54/0x3a0 [ 36.572740] alloc_disk+0x18/0x20 [ 36.576197] loop_add+0x368/0x7a0 [ 36.579646] loop_control_ioctl+0x136/0x300 [ 36.583975] compat_SyS_ioctl+0x12d/0x1fd0 [ 36.588201] do_fast_syscall_32+0x2f1/0xa10 [ 36.592533] entry_SYSENTER_compat+0x90/0xa2 [ 36.596925] [ 36.598546] Freed by task 2105: [ 36.601815] save_stack_trace+0x16/0x20 [ 36.605780] kasan_slab_free+0xac/0x190 [ 36.609746] kfree+0xfb/0x310 [ 36.612855] disk_release+0x259/0x330 [ 36.616643] device_release+0x7e/0x220 [ 36.620505] kobject_put+0x148/0x250 [ 36.624336] put_disk+0x23/0x30 [ 36.627605] __blkdev_get+0x616/0xd60 [ 36.631377] blkdev_get+0x2da/0x920 [ 36.634974] blkdev_open+0x1a5/0x250 [ 36.638661] do_dentry_open+0x3ef/0xc90 [ 36.642609] vfs_open+0x11c/0x210 [ 36.646035] path_openat+0x542/0x2790 [ 36.649823] do_filp_open+0x197/0x270 [ 36.653618] do_sys_open+0x30d/0x5c0 [ 36.657305] compat_SyS_open+0x2a/0x40 [ 36.661273] do_fast_syscall_32+0x2f1/0xa10 [ 36.665619] entry_SYSENTER_compat+0x90/0xa2 [ 36.670012] [ 36.671616] The buggy address belongs to the object at ffff8801cd5d2200 [ 36.671616] which belongs to the cache kmalloc-2048 of size 2048 [ 36.684425] The buggy address is located 1376 bytes inside of [ 36.684425] 2048-byte region [ffff8801cd5d2200, ffff8801cd5d2a00) [ 36.696470] The buggy address belongs to the page: [ 36.701396] page:ffffea0007357400 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 36.711619] flags: 0x4000000000004080(slab|head) [ 36.716360] page dumped because: kasan: bad access detected [ 36.722060] [ 36.723663] Memory state around the buggy address: [ 36.728566] ffff8801cd5d2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.736011] ffff8801cd5d2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.743361] >ffff8801cd5d2700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.750703] ^ [ 36.757167] ffff8801cd5d2780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.764496] ffff8801cd5d2800: 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.771830] ================================================================== [ 36.779169] Disabling lock debugging due to kernel taint [ 36.785953] Kernel panic - not syncing: panic_on_warn set ... [ 36.785953] [ 36.793312] CPU: 1 PID: 2105 Comm: syz-executor070 Tainted: G B 4.9.141+ #23 [ 36.801606] ffff8801cdfb7648 ffffffff81b42e79 ffffffff82e37630 00000000ffffffff [ 36.809653] 0000000000000000 0000000000000001 0000000000000000 ffff8801cdfb7708 [ 36.817685] ffffffff813f7125 0000000041b58ab3 ffffffff82e2b62b ffffffff813f6f66 [ 36.825696] Call Trace: executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.828263] [] dump_stack+0xc1/0x128 [ 36.833606] [] panic+0x1bf/0x39f [ 36.838598] [] ? add_taint.cold.5+0x16/0x16 [ 36.844548] [] ? ___preempt_schedule+0x16/0x18 [ 36.850765] [] kasan_end_report+0x47/0x4f [ 36.856591] [] kasan_report.cold.6+0x76/0x2fe [ 36.862737] [] ? disk_unblock_events+0x51/0x60 [ 36.869051] [] __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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.875783] [] disk_unblock_events+0x51/0x60 [ 36.881829] [] __blkdev_get+0x6b6/0xd60 [ 36.887433] [] ? __blkdev_put+0x840/0x840 [ 36.893348] [] blkdev_get+0x2da/0x920 [ 36.898779] [] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 36.905598] [] ? bd_may_claim+0xd0/0xd0 [ 36.911201] [] ? bd_acquire+0xfc/0x250 [ 36.916722] [] ? bd_acquire+0x133/0x250 [ 36.922324] [] ? _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 executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.928284] [] blkdev_open+0x1a5/0x250 [ 36.933802] [] do_dentry_open+0x3ef/0xc90 [ 36.939579] [] ? blkdev_get_by_dev+0x70/0x70 [ 36.945644] [] vfs_open+0x11c/0x210 [ 36.950912] [] ? may_open.isra.20+0x14f/0x2a0 [ 36.957047] [] path_openat+0x542/0x2790 [ 36.962652] [] ? path_mountpoint+0x6c0/0x6c0 [ 36.968689] [] ? 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 36.974726] [] ? expand_files.part.3+0x3a9/0x6d0 [ 36.981107] [] do_filp_open+0x197/0x270 [ 36.986720] [] ? may_open_dev+0xe0/0xe0 [ 36.992389] [] ? _raw_spin_unlock+0x2c/0x50 [ 36.998447] [] ? __alloc_fd+0x1d7/0x4a0 [ 37.004052] [] do_sys_open+0x30d/0x5c0 [ 37.009572] [] ? filp_open+0x70/0x70 [ 37.014931] [] ? up_read+0x1a/0x40 [ 37.020103] [] ? move_addr_to_kernel+0x50/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 [ 37.026314] [] compat_SyS_open+0x2a/0x40 [ 37.032009] [] ? compat_SyS_getdents64+0x280/0x280 [ 37.038573] [] do_fast_syscall_32+0x2f1/0xa10 [ 37.044713] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.051417] [] entry_SYSENTER_compat+0x90/0xa2 [ 37.057915] Kernel Offset: disabled [ 37.061531] Rebooting in 86400 seconds..