[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 27.166475] kauditd_printk_skb: 7 callbacks suppressed [ 27.166487] audit: type=1800 audit(1541386228.355:29): pid=5515 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 27.198946] audit: type=1800 audit(1541386228.355:30): pid=5515 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.75' (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 syzkaller login: [ 39.188579] ================================================================== [ 39.196121] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 39.202104] Read of size 8 at addr ffff8801d7cb3200 by task syz-executor067/5682 [ 39.209631] [ 39.211266] CPU: 0 PID: 5682 Comm: syz-executor067 Not tainted 4.19.0+ #320 [ 39.218367] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.227717] Call Trace: [ 39.230314] dump_stack+0x244/0x39d [ 39.233954] ? dump_stack_print_info.cold.1+0x20/0x20 [ 39.239142] ? printk+0xa7/0xcf [ 39.242426] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 39.247195] print_address_description.cold.7+0x9/0x1ff [ 39.252571] kasan_report.cold.8+0x242/0x309 [ 39.256980] ? vb2_mmap+0x662/0x6f0 [ 39.260612] __asan_report_load8_noabort+0x14/0x20 [ 39.265555] vb2_mmap+0x662/0x6f0 [ 39.269017] ? vb2_poll+0x1d0/0x1d0 [ 39.272646] vb2_fop_mmap+0x4b/0x70 [ 39.276279] v4l2_mmap+0x153/0x200 [ 39.279825] mmap_region+0xe85/0x1cd0 [ 39.283642] ? __x64_sys_brk+0x8b0/0x8b0 [ 39.287704] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 39.292981] ? rcu_softirq_qs+0x20/0x20 [ 39.296968] ? mpx_unmapped_area_check+0xd8/0x108 [ 39.301818] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 39.307277] ? arch_get_unmapped_area+0x750/0x750 [ 39.312124] ? lock_acquire+0x1ed/0x520 [ 39.316103] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 39.321141] ? cap_mmap_addr+0x52/0x130 [ 39.325120] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.330664] ? security_mmap_addr+0x80/0xa0 [ 39.334993] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.340549] ? get_unmapped_area+0x292/0x3b0 [ 39.344974] do_mmap+0xa22/0x1230 [ 39.348439] ? mmap_region+0x1cd0/0x1cd0 [ 39.352502] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 39.356586] ? down_read_killable+0x150/0x150 [ 39.361091] ? security_mmap_file+0x174/0x1b0 [ 39.365598] vm_mmap_pgoff+0x213/0x2c0 [ 39.369501] ? vma_is_stack_for_current+0xd0/0xd0 [ 39.374365] ? putname+0xf2/0x130 [ 39.377839] ? rcu_read_lock_sched_held+0x14f/0x180 [ 39.382876] ksys_mmap_pgoff+0x4da/0x660 [ 39.386941] ? do_syscall_64+0x9a/0x820 [ 39.390922] ? find_mergeable_anon_vma+0xd0/0xd0 [ 39.395686] ? trace_hardirqs_on+0xbd/0x310 [ 39.400014] ? filp_open+0x80/0x80 [ 39.403573] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.408939] ? trace_hardirqs_off_caller+0x310/0x310 [ 39.414053] __x64_sys_mmap+0xe9/0x1b0 [ 39.417951] do_syscall_64+0x1b9/0x820 [ 39.421843] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 39.427211] ? syscall_return_slowpath+0x5e0/0x5e0 [ 39.432141] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.436986] ? trace_hardirqs_on_caller+0x310/0x310 [ 39.442004] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 39.447024] ? prepare_exit_to_usermode+0x291/0x3b0 [ 39.452051] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.456905] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.462095] RIP: 0033:0x444bf9 [ 39.465292] 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 [ 39.484199] RSP: 002b:00007fff8b0b3418 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 39.491915] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444bf9 [ 39.499197] RDX: 000000000000000d RSI: 0000000000002000 RDI: 0000000020ffe000 [ 39.506477] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000000 [ 39.513767] R10: 0000000000080851 R11: 0000000000000216 R12: 0000000000009856 [ 39.521040] R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000 [ 39.528329] [ 39.529961] Allocated by task 5683: [ 39.533620] save_stack+0x43/0xd0 [ 39.537080] kasan_kmalloc+0xc7/0xe0 [ 39.540795] __kmalloc+0x15b/0x760 [ 39.544338] __vb2_queue_alloc+0xf7/0xf90 [ 39.548484] vb2_core_reqbufs+0x971/0x1040 [ 39.552726] vb2_ioctl_reqbufs+0x1f5/0x3a0 [ 39.556960] v4l_reqbufs+0xae/0xd0 [ 39.560497] __video_do_ioctl+0x8b1/0x1050 [ 39.564749] video_usercopy+0x5c1/0x1760 [ 39.568813] video_ioctl2+0x2c/0x33 [ 39.572441] v4l2_ioctl+0x154/0x1b0 [ 39.576066] do_vfs_ioctl+0x1de/0x1790 [ 39.579955] ksys_ioctl+0xa9/0xd0 [ 39.583406] __x64_sys_ioctl+0x73/0xb0 [ 39.587294] do_syscall_64+0x1b9/0x820 [ 39.591188] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.596369] [ 39.597990] Freed by task 5683: [ 39.601274] save_stack+0x43/0xd0 [ 39.604732] __kasan_slab_free+0x102/0x150 [ 39.608966] kasan_slab_free+0xe/0x10 [ 39.612769] kfree+0xcf/0x230 [ 39.615879] __vb2_queue_free+0x5e2/0xa30 [ 39.620032] vb2_core_queue_release+0x62/0x80 [ 39.624546] _vb2_fop_release+0x1d2/0x2b0 [ 39.628695] vb2_fop_release+0x77/0xc0 [ 39.632584] v4l2_release+0x2f2/0x3a0 [ 39.636390] __fput+0x385/0xa30 [ 39.639672] ____fput+0x15/0x20 [ 39.642957] task_work_run+0x1e8/0x2a0 [ 39.646846] exit_to_usermode_loop+0x318/0x380 [ 39.651430] do_syscall_64+0x6be/0x820 [ 39.655325] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.660505] [ 39.662149] The buggy address belongs to the object at ffff8801d7cb3200 [ 39.662149] which belongs to the cache kmalloc-1k of size 1024 [ 39.674814] The buggy address is located 0 bytes inside of [ 39.674814] 1024-byte region [ffff8801d7cb3200, ffff8801d7cb3600) [ 39.686600] The buggy address belongs to the page: [ 39.691542] page:ffffea00075f2c80 count:1 mapcount:0 mapping:ffff8801da800ac0 index:0x0 compound_mapcount: 0 [ 39.701522] flags: 0x2fffc0000010200(slab|head) [ 39.706206] raw: 02fffc0000010200 ffffea00072e8688 ffffea00075d1408 ffff8801da800ac0 [ 39.714092] raw: 0000000000000000 ffff8801d7cb2000 0000000100000007 0000000000000000 [ 39.721967] page dumped because: kasan: bad access detected [ 39.727670] [ 39.729294] Memory state around the buggy address: [ 39.734223] ffff8801d7cb3100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.741585] ffff8801d7cb3180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.748945] >ffff8801d7cb3200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.756300] ^ [ 39.759673] ffff8801d7cb3280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.767032] ffff8801d7cb3300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.774880] ================================================================== [ 39.782239] Disabling lock debugging due to kernel taint [ 39.788376] Kernel panic - not syncing: panic_on_warn set ... [ 39.794275] CPU: 0 PID: 5682 Comm: syz-executor067 Tainted: G B 4.19.0+ #320 [ 39.802742] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.812076] Call Trace: [ 39.814673] dump_stack+0x244/0x39d [ 39.818286] ? dump_stack_print_info.cold.1+0x20/0x20 [ 39.823465] panic+0x2ad/0x55c [ 39.826636] ? add_taint.cold.5+0x16/0x16 [ 39.830767] ? preempt_schedule+0x4d/0x60 [ 39.834900] ? ___preempt_schedule+0x16/0x18 [ 39.839296] ? trace_hardirqs_on+0xb4/0x310 [ 39.843608] kasan_end_report+0x47/0x4f [ 39.847568] kasan_report.cold.8+0x76/0x309 [ 39.851872] ? vb2_mmap+0x662/0x6f0 [ 39.855481] __asan_report_load8_noabort+0x14/0x20 [ 39.860394] vb2_mmap+0x662/0x6f0 [ 39.863831] ? vb2_poll+0x1d0/0x1d0 [ 39.867441] vb2_fop_mmap+0x4b/0x70 [ 39.871061] v4l2_mmap+0x153/0x200 [ 39.874591] mmap_region+0xe85/0x1cd0 [ 39.878388] ? __x64_sys_brk+0x8b0/0x8b0 [ 39.882431] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 39.887701] ? rcu_softirq_qs+0x20/0x20 [ 39.891670] ? mpx_unmapped_area_check+0xd8/0x108 [ 39.896496] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 39.901938] ? arch_get_unmapped_area+0x750/0x750 [ 39.907174] ? lock_acquire+0x1ed/0x520 [ 39.911130] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 39.916130] ? cap_mmap_addr+0x52/0x130 [ 39.920117] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.925639] ? security_mmap_addr+0x80/0xa0 [ 39.929949] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.935469] ? get_unmapped_area+0x292/0x3b0 [ 39.939859] do_mmap+0xa22/0x1230 [ 39.943297] ? mmap_region+0x1cd0/0x1cd0 [ 39.947356] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 39.951419] ? down_read_killable+0x150/0x150 [ 39.955915] ? security_mmap_file+0x174/0x1b0 [ 39.960395] vm_mmap_pgoff+0x213/0x2c0 [ 39.964270] ? vma_is_stack_for_current+0xd0/0xd0 [ 39.969096] ? putname+0xf2/0x130 [ 39.972541] ? rcu_read_lock_sched_held+0x14f/0x180 [ 39.977546] ksys_mmap_pgoff+0x4da/0x660 [ 39.981599] ? do_syscall_64+0x9a/0x820 [ 39.985568] ? find_mergeable_anon_vma+0xd0/0xd0 [ 39.990304] ? trace_hardirqs_on+0xbd/0x310 [ 39.994604] ? filp_open+0x80/0x80 [ 39.998126] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.003492] ? trace_hardirqs_off_caller+0x310/0x310 [ 40.008595] __x64_sys_mmap+0xe9/0x1b0 [ 40.012466] do_syscall_64+0x1b9/0x820 [ 40.016337] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 40.021682] ? syscall_return_slowpath+0x5e0/0x5e0 [ 40.026592] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.031417] ? trace_hardirqs_on_caller+0x310/0x310 [ 40.036437] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 40.041439] ? prepare_exit_to_usermode+0x291/0x3b0 [ 40.046451] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.051281] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.056453] RIP: 0033:0x444bf9 [ 40.059628] 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 [ 40.078520] RSP: 002b:00007fff8b0b3418 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 40.086231] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444bf9 [ 40.093483] RDX: 000000000000000d RSI: 0000000000002000 RDI: 0000000020ffe000 [ 40.100736] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000000 [ 40.107986] R10: 0000000000080851 R11: 0000000000000216 R12: 0000000000009856 [ 40.115235] R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000 [ 40.123435] Kernel Offset: disabled [ 40.127061] Rebooting in 86400 seconds..