[....] 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: [ 27.475460] random: sshd: uninitialized urandom read (32 bytes read) [ 27.696291] audit: type=1400 audit(1549218488.645:6): avc: denied { map } for pid=1751 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 [ 27.727842] random: sshd: uninitialized urandom read (32 bytes read) [ 28.196731] random: sshd: uninitialized urandom read (32 bytes read) [ 59.041353] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.196' (ECDSA) to the list of known hosts. [ 64.548836] random: sshd: uninitialized urandom read (32 bytes read) executing program executing program executing program executing program executing program executing program [ 64.636105] audit: type=1400 audit(1549218525.585:7): avc: denied { map } for pid=1787 comm="syz-executor074" path="/root/syz-executor074488398" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 65.754378] ================================================================== [ 65.761795] BUG: KASAN: use-after-free in disk_unblock_events+0x4b/0x50 [ 65.768585] Read of size 8 at addr ffff8881d1ad0de8 by task blkid/1883 [ 65.775238] [ 65.776848] CPU: 1 PID: 1883 Comm: blkid Not tainted 4.14.97+ #1 [ 65.782981] Call Trace: [ 65.785555] dump_stack+0xb9/0x10e [ 65.789085] ? disk_unblock_events+0x4b/0x50 [ 65.793486] print_address_description+0x60/0x226 [ 65.798321] ? disk_unblock_events+0x4b/0x50 [ 65.802718] kasan_report.cold+0x88/0x2a5 [ 65.806871] ? disk_unblock_events+0x4b/0x50 [ 65.811263] ? __blkdev_get+0x68f/0xf90 [ 65.815224] ? __blkdev_put+0x6d0/0x6d0 [ 65.819293] ? fsnotify+0x824/0x10c0 [ 65.822991] ? blkdev_get+0x97/0x8b0 [ 65.826687] ? bd_acquire+0x171/0x2c0 [ 65.830471] ? bd_may_claim+0xd0/0xd0 [ 65.834251] ? lock_downgrade+0x5d0/0x5d0 [ 65.838377] ? lock_acquire+0x10f/0x380 [ 65.842391] ? bd_acquire+0x21/0x2c0 [ 65.846103] ? blkdev_open+0x1cc/0x250 [ 65.849977] ? security_file_open+0x88/0x190 [ 65.854371] ? do_dentry_open+0x41b/0xd60 [ 65.858499] ? bd_acquire+0x2c0/0x2c0 [ 65.862287] ? vfs_open+0x105/0x230 [ 65.865894] ? path_openat+0xb6b/0x2b70 [ 65.869981] ? path_mountpoint+0x9a0/0x9a0 [ 65.874209] ? trace_hardirqs_on+0x10/0x10 [ 65.878429] ? do_filp_open+0x1a1/0x280 [ 65.882380] ? may_open_dev+0xe0/0xe0 [ 65.886165] ? lock_downgrade+0x5d0/0x5d0 [ 65.890290] ? lock_acquire+0x10f/0x380 [ 65.894246] ? __alloc_fd+0x3f/0x490 [ 65.897944] ? _raw_spin_unlock+0x29/0x40 [ 65.902069] ? __alloc_fd+0x1bf/0x490 [ 65.905877] ? do_sys_open+0x2ca/0x590 [ 65.909750] ? filp_open+0x60/0x60 [ 65.913283] ? do_syscall_64+0x43/0x4b0 [ 65.917254] ? do_sys_open+0x590/0x590 [ 65.921129] ? do_syscall_64+0x19b/0x4b0 [ 65.925179] ? entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 65.930525] [ 65.932251] Allocated by task 1877: [ 65.935869] kasan_kmalloc.part.0+0x4f/0xd0 [ 65.940176] kmem_cache_alloc_trace+0x126/0x310 [ 65.944826] alloc_disk_node+0x5b/0x3d0 [ 65.948787] [ 65.950391] Freed by task 1883: [ 65.953650] kasan_slab_free+0xb0/0x190 [ 65.957597] kfree+0xf5/0x310 [ 65.960679] device_release+0xf4/0x1a0 [ 65.964721] [ 65.966718] The buggy address belongs to the object at ffff8881d1ad0880 [ 65.966718] which belongs to the cache kmalloc-2048 of size 2048 [ 65.980921] The buggy address is located 1384 bytes inside of [ 65.980921] 2048-byte region [ffff8881d1ad0880, ffff8881d1ad1080) [ 65.992947] The buggy address belongs to the page: [ 65.997865] page:ffffea000746b400 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 66.007814] flags: 0x4000000000008100(slab|head) [ 66.012553] raw: 4000000000008100 0000000000000000 0000000000000000 00000001800f000f [ 66.020411] raw: dead000000000100 dead000000000200 ffff8881da802800 0000000000000000 [ 66.028336] page dumped because: kasan: bad access detected [ 66.034042] [ 66.035649] Memory state around the buggy address: [ 66.040556] ffff8881d1ad0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.047898] ffff8881d1ad0d00: 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 [ 66.055237] >ffff8881d1ad0d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.062580] ^ [ 66.069311] ffff8881d1ad0e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.076646] ffff8881d1ad0e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 66.083982] ================================================================== [ 66.091420] 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 [ 66.101074] Kernel panic - not syncing: panic_on_warn set ... [ 66.101074] [ 66.108451] CPU: 1 PID: 1883 Comm: blkid Tainted: G B 4.14.97+ #1 [ 66.115800] Call Trace: [ 66.118399] dump_stack+0xb9/0x10e [ 66.121936] panic+0x1d9/0x3c2 [ 66.125130] ? add_taint.cold+0x16/0x16 [ 66.129105] ? disk_unblock_events+0x4b/0x50 [ 66.133504] ? ___preempt_schedule+0x16/0x18 [ 66.137903] ? disk_unblock_events+0x4b/0x50 [ 66.142396] kasan_end_report+0x43/0x49 [ 66.146359] kasan_report.cold+0xa4/0x2a5 [ 66.150502] ? disk_unblock_events+0x4b/0x50 [ 66.154905] ? __blkdev_get+0x68f/0xf90 [ 66.158883] ? __blkdev_put+0x6d0/0x6d0 [ 66.162854] ? fsnotify+0x824/0x10c0 [ 66.166552] ? blkdev_get+0x97/0x8b0 [ 66.170256] ? bd_acquire+0x171/0x2c0 [ 66.174043] ? bd_may_claim+0xd0/0xd0 [ 66.177843] ? lock_downgrade+0x5d0/0x5d0 [ 66.181976] ? lock_acquire+0x10f/0x380 [ 66.185933] ? bd_acquire+0x21/0x2c0 [ 66.189638] ? blkdev_open+0x1cc/0x250 [ 66.193522] ? security_file_open+0x88/0x190 [ 66.197924] ? do_dentry_open+0x41b/0xd60 [ 66.202119] ? bd_acquire+0x2c0/0x2c0 [ 66.205915] ? vfs_open+0x105/0x230 [ 66.209533] ? path_openat+0xb6b/0x2b70 [ 66.213501] ? path_mountpoint+0x9a0/0x9a0 [ 66.217725] ? trace_hardirqs_on+0x10/0x10 [ 66.221948] ? do_filp_open+0x1a1/0x280 [ 66.225911] ? may_open_dev+0xe0/0xe0 [ 66.229709] ? lock_downgrade+0x5d0/0x5d0 [ 66.233855] ? lock_acquire+0x10f/0x380 [ 66.237813] ? __alloc_fd+0x3f/0x490 [ 66.241535] ? _raw_spin_unlock+0x29/0x40 [ 66.245675] ? __alloc_fd+0x1bf/0x490 [ 66.249471] ? do_sys_open+0x2ca/0x590 [ 66.253342] ? filp_open+0x60/0x60 [ 66.256869] ? do_syscall_64+0x43/0x4b0 [ 66.260845] ? do_sys_open+0x590/0x590 [ 66.264729] ? do_syscall_64+0x19b/0x4b0 [ 66.268793] ? entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 66.274570] Kernel Offset: 0x38400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 66.285477] Rebooting in 86400 seconds..