[ 27.948855] audit: type=1800 audit(1540922760.016:27): pid=5571 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 27.986528] audit: type=1800 audit(1540922760.096:28): pid=5571 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 28.748129] audit: type=1800 audit(1540922760.856:29): pid=5571 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 28.774769] audit: type=1800 audit(1540922760.866:30): pid=5571 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 34.079475] sshd (5711) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.0.92' (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 [ 40.797447] ================================================================== [ 40.804967] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 40.810926] Read of size 8 at addr ffff8801d35427c0 by task syz-executor296/5745 [ 40.818443] [ 40.820063] CPU: 0 PID: 5745 Comm: syz-executor296 Not tainted 4.19.0+ #88 [ 40.827059] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.836472] Call Trace: [ 40.839060] dump_stack+0x244/0x39d [ 40.842676] ? dump_stack_print_info.cold.1+0x20/0x20 [ 40.847897] ? printk+0xa7/0xcf [ 40.851177] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 40.855927] print_address_description.cold.7+0x9/0x1ff [ 40.861277] kasan_report.cold.8+0x242/0x309 [ 40.865929] ? vb2_mmap+0x65f/0x6e0 [ 40.869551] __asan_report_load8_noabort+0x14/0x20 [ 40.874465] vb2_mmap+0x65f/0x6e0 [ 40.877950] ? vb2_poll+0x1d0/0x1d0 [ 40.881578] vb2_fop_mmap+0x4b/0x70 [ 40.885196] v4l2_mmap+0x153/0x200 [ 40.888735] mmap_region+0xe85/0x1cd0 [ 40.892525] ? __x64_sys_brk+0x8b0/0x8b0 [ 40.896569] ? zap_class+0x640/0x640 [ 40.900279] ? mpx_unmapped_area_check+0xd8/0x108 [ 40.905120] ? arch_get_unmapped_area+0x750/0x750 [ 40.909954] ? lock_acquire+0x1ed/0x520 [ 40.913917] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 40.918917] ? cap_mmap_addr+0x52/0x130 [ 40.922886] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 40.928417] ? security_mmap_addr+0x80/0xa0 [ 40.932750] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 40.938287] ? get_unmapped_area+0x292/0x3b0 [ 40.942694] do_mmap+0xa22/0x1230 [ 40.946175] ? mmap_region+0x1cd0/0x1cd0 [ 40.950235] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 40.954293] ? down_read_killable+0x150/0x150 [ 40.958774] ? security_mmap_file+0x174/0x1b0 [ 40.963258] vm_mmap_pgoff+0x213/0x2c0 [ 40.967151] ? vma_is_stack_for_current+0xd0/0xd0 [ 40.971977] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 40.977494] ? security_file_permission+0x1c2/0x220 [ 40.982498] ksys_mmap_pgoff+0x4da/0x660 [ 40.986540] ? do_syscall_64+0x9a/0x820 [ 40.990500] ? find_mergeable_anon_vma+0xd0/0xd0 [ 40.995239] ? trace_hardirqs_on+0xbd/0x310 [ 40.999551] ? __ia32_sys_read+0xb0/0xb0 [ 41.003704] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.009053] ? trace_hardirqs_off_caller+0x310/0x310 [ 41.014144] __x64_sys_mmap+0xe9/0x1b0 [ 41.018023] do_syscall_64+0x1b9/0x820 [ 41.021907] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 41.027255] ? syscall_return_slowpath+0x5e0/0x5e0 [ 41.032183] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.037014] ? trace_hardirqs_on_caller+0x310/0x310 [ 41.042029] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 41.047035] ? prepare_exit_to_usermode+0x291/0x3b0 [ 41.052040] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.056939] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.062128] RIP: 0033:0x444ba9 [ 41.065305] Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b ce fb ff c3 66 2e 0f 1f 84 00 00 00 00 [ 41.084231] RSP: 002b:00007ffe309746d8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 41.091931] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 41.099197] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 41.106460] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 41.113714] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000009f39 [ 41.120981] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 41.128268] [ 41.129891] Allocated by task 5743: [ 41.133519] save_stack+0x43/0xd0 [ 41.136956] kasan_kmalloc+0xc7/0xe0 [ 41.140648] __kmalloc+0x15b/0x760 [ 41.144171] __vb2_queue_alloc+0xf7/0xf20 [ 41.148297] vb2_core_reqbufs+0x971/0x1040 [ 41.152520] __vb2_init_fileio+0x344/0xc90 [ 41.156741] __vb2_perform_fileio+0xcfb/0x1210 [ 41.161303] vb2_write+0x38/0x50 [ 41.164661] vb2_fop_write+0x20a/0x400 [ 41.168535] v4l2_write+0x168/0x220 [ 41.172169] __vfs_write+0x119/0x9f0 [ 41.175865] vfs_write+0x1fc/0x560 [ 41.179394] ksys_write+0x101/0x260 [ 41.183004] __x64_sys_write+0x73/0xb0 [ 41.186873] do_syscall_64+0x1b9/0x820 [ 41.190786] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.195963] [ 41.197573] Freed by task 5743: [ 41.200844] save_stack+0x43/0xd0 [ 41.204282] __kasan_slab_free+0x102/0x150 [ 41.208510] kasan_slab_free+0xe/0x10 [ 41.212292] kfree+0xcf/0x230 [ 41.215394] __vb2_queue_free+0x5e2/0xa30 [ 41.219536] vb2_core_reqbufs+0x2da/0x1040 [ 41.223763] __vb2_cleanup_fileio+0xf0/0x160 [ 41.228172] vb2_core_queue_release+0x1e/0x80 [ 41.232654] _vb2_fop_release+0x1d2/0x2b0 [ 41.236787] vb2_fop_release+0x77/0xc0 [ 41.240674] vivid_fop_release+0x18e/0x440 [ 41.244945] v4l2_release+0xfb/0x1a0 [ 41.248651] __fput+0x385/0xa30 [ 41.251925] ____fput+0x15/0x20 [ 41.255189] task_work_run+0x1e8/0x2a0 [ 41.259057] exit_to_usermode_loop+0x318/0x380 [ 41.263620] do_syscall_64+0x6be/0x820 [ 41.267495] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.272664] [ 41.274277] The buggy address belongs to the object at ffff8801d35427c0 [ 41.274277] which belongs to the cache kmalloc-512 of size 512 [ 41.286956] The buggy address is located 0 bytes inside of [ 41.286956] 512-byte region [ffff8801d35427c0, ffff8801d35429c0) [ 41.298647] The buggy address belongs to the page: [ 41.303565] page:ffffea00074d5080 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 41.311742] flags: 0x2fffc0000000200(slab) [ 41.316031] raw: 02fffc0000000200 ffffea00074d4f48 ffffea00074d5508 ffff8801da800940 [ 41.324007] raw: 0000000000000000 ffff8801d3542040 0000000100000006 0000000000000000 [ 41.331868] page dumped because: kasan: bad access detected [ 41.337558] [ 41.339237] Memory state around the buggy address: [ 41.344156] ffff8801d3542680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.351499] ffff8801d3542700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 41.358841] >ffff8801d3542780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 41.366185] ^ [ 41.371632] ffff8801d3542800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.378975] ffff8801d3542880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.386401] ================================================================== [ 41.393750] Disabling lock debugging due to kernel taint [ 41.399460] Kernel panic - not syncing: panic_on_warn set ... [ 41.399460] [ 41.406823] CPU: 0 PID: 5745 Comm: syz-executor296 Tainted: G B 4.19.0+ #88 [ 41.415305] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.424641] Call Trace: [ 41.427215] dump_stack+0x244/0x39d [ 41.430826] ? dump_stack_print_info.cold.1+0x20/0x20 [ 41.436003] panic+0x238/0x4e7 [ 41.439187] ? add_taint.cold.5+0x16/0x16 [ 41.443322] ? preempt_schedule+0x4d/0x60 [ 41.447461] ? ___preempt_schedule+0x16/0x18 [ 41.451862] ? trace_hardirqs_on+0xb4/0x310 [ 41.456170] kasan_end_report+0x47/0x4f [ 41.460129] kasan_report.cold.8+0x76/0x309 [ 41.464434] ? vb2_mmap+0x65f/0x6e0 [ 41.468046] __asan_report_load8_noabort+0x14/0x20 [ 41.473004] vb2_mmap+0x65f/0x6e0 [ 41.476509] ? vb2_poll+0x1d0/0x1d0 [ 41.480123] vb2_fop_mmap+0x4b/0x70 [ 41.483735] v4l2_mmap+0x153/0x200 [ 41.487260] mmap_region+0xe85/0x1cd0 [ 41.491044] ? __x64_sys_brk+0x8b0/0x8b0 [ 41.495101] ? zap_class+0x640/0x640 [ 41.498812] ? mpx_unmapped_area_check+0xd8/0x108 [ 41.503646] ? arch_get_unmapped_area+0x750/0x750 [ 41.508475] ? lock_acquire+0x1ed/0x520 [ 41.512451] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 41.517455] ? cap_mmap_addr+0x52/0x130 [ 41.521422] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.526953] ? security_mmap_addr+0x80/0xa0 [ 41.531268] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.536816] ? get_unmapped_area+0x292/0x3b0 [ 41.541254] do_mmap+0xa22/0x1230 [ 41.544738] ? mmap_region+0x1cd0/0x1cd0 [ 41.548791] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 41.552939] ? down_read_killable+0x150/0x150 [ 41.557492] ? security_mmap_file+0x174/0x1b0 [ 41.561980] vm_mmap_pgoff+0x213/0x2c0 [ 41.565856] ? vma_is_stack_for_current+0xd0/0xd0 [ 41.570682] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.576378] ? security_file_permission+0x1c2/0x220 [ 41.581391] ksys_mmap_pgoff+0x4da/0x660 [ 41.585441] ? do_syscall_64+0x9a/0x820 [ 41.589400] ? find_mergeable_anon_vma+0xd0/0xd0 [ 41.594144] ? trace_hardirqs_on+0xbd/0x310 [ 41.598447] ? __ia32_sys_read+0xb0/0xb0 [ 41.602492] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.607839] ? trace_hardirqs_off_caller+0x310/0x310 [ 41.612933] __x64_sys_mmap+0xe9/0x1b0 [ 41.616874] do_syscall_64+0x1b9/0x820 [ 41.620752] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 41.626105] ? syscall_return_slowpath+0x5e0/0x5e0 [ 41.631046] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.635872] ? trace_hardirqs_on_caller+0x310/0x310 [ 41.640870] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 41.645886] ? prepare_exit_to_usermode+0x291/0x3b0 [ 41.650893] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.655720] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 41.660891] RIP: 0033:0x444ba9 [ 41.664066] Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b ce fb ff c3 66 2e 0f 1f 84 00 00 00 00 [ 41.682974] RSP: 002b:00007ffe309746d8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 41.690670] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 41.697924] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 41.705175] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 41.712432] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000009f39 [ 41.719683] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 41.727911] Kernel Offset: disabled [ 41.731535] Rebooting in 86400 seconds..