[....] 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. [ 28.980381] kauditd_printk_skb: 8 callbacks suppressed [ 28.980393] audit: type=1800 audit(1543465171.175:29): pid=5905 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 [ 29.007529] audit: type=1800 audit(1543465171.175:30): pid=5905 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 syzkaller login: [ 32.508013] sshd (6044) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.10.23' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program [ 39.051946] ================================================================== [ 39.059508] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 39.065482] Read of size 8 at addr ffff8881ccc42d80 by task syz-executor444/6068 [ 39.072991] [ 39.074607] CPU: 0 PID: 6068 Comm: syz-executor444 Not tainted 4.20.0-rc4+ #353 [ 39.082033] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.091367] Call Trace: [ 39.093944] dump_stack+0x244/0x39d [ 39.097563] ? dump_stack_print_info.cold.1+0x20/0x20 [ 39.102745] ? printk+0xa7/0xcf [ 39.106015] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 39.110775] print_address_description.cold.7+0x9/0x1ff [ 39.116127] kasan_report.cold.8+0x242/0x309 [ 39.120545] ? vb2_mmap+0x662/0x6f0 [ 39.124172] __asan_report_load8_noabort+0x14/0x20 [ 39.129085] vb2_mmap+0x662/0x6f0 [ 39.132525] ? vb2_poll+0x1d0/0x1d0 [ 39.136138] vb2_fop_mmap+0x4b/0x70 [ 39.139763] v4l2_mmap+0x153/0x200 [ 39.143302] mmap_region+0xe85/0x1cd0 [ 39.147109] ? __x64_sys_brk+0x8b0/0x8b0 [ 39.151155] ? rcu_softirq_qs+0x20/0x20 [ 39.155129] ? mpx_unmapped_area_check+0xd8/0x108 [ 39.159960] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 39.165398] ? arch_get_unmapped_area+0x750/0x750 [ 39.170228] ? lock_acquire+0x1ed/0x520 [ 39.174190] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 39.179195] ? cap_mmap_addr+0x52/0x130 [ 39.183154] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.188685] ? security_mmap_addr+0x80/0xa0 [ 39.192995] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.198528] ? get_unmapped_area+0x292/0x3b0 [ 39.202949] do_mmap+0xa22/0x1230 [ 39.206421] ? mmap_region+0x1cd0/0x1cd0 [ 39.210483] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 39.214531] ? down_read_killable+0x150/0x150 [ 39.219013] ? security_mmap_file+0x174/0x1b0 [ 39.223496] vm_mmap_pgoff+0x213/0x2c0 [ 39.227373] ? vma_is_stack_for_current+0xd0/0xd0 [ 39.232204] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.237725] ? __fget_light+0x2e9/0x430 [ 39.241711] ? fget_raw+0x20/0x20 [ 39.245158] ? up_read+0x225/0x2c0 [ 39.248690] ksys_mmap_pgoff+0x4da/0x660 [ 39.252746] ? do_syscall_64+0x9a/0x820 [ 39.256715] ? find_mergeable_anon_vma+0xd0/0xd0 [ 39.261463] ? trace_hardirqs_on+0xbd/0x310 [ 39.265773] ? security_file_ioctl+0x94/0xc0 [ 39.270185] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.275546] ? trace_hardirqs_off_caller+0x310/0x310 [ 39.280653] __x64_sys_mmap+0xe9/0x1b0 [ 39.284531] do_syscall_64+0x1b9/0x820 [ 39.288417] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 39.293784] ? syscall_return_slowpath+0x5e0/0x5e0 [ 39.298701] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.303531] ? trace_hardirqs_on_caller+0x310/0x310 [ 39.308532] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 39.313534] ? prepare_exit_to_usermode+0x291/0x3b0 [ 39.318551] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.323395] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.328568] RIP: 0033:0x444c89 [ 39.331761] 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.350646] RSP: 002b:00007ffc42fec548 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 39.358346] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444c89 [ 39.365631] RDX: fffffffffffffffd RSI: 0000000000002000 RDI: 0000000020ffe000 [ 39.372888] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 39.380159] R10: 0000000000000011 R11: 0000000000000212 R12: 0000000000401f40 [ 39.387417] R13: 0000000000401fd0 R14: 0000000000000000 R15: 0000000000000000 [ 39.394679] [ 39.396291] Allocated by task 6063: [ 39.399914] save_stack+0x43/0xd0 [ 39.403377] kasan_kmalloc+0xc7/0xe0 [ 39.407086] __kmalloc+0x15b/0x760 [ 39.410611] __vb2_queue_alloc+0xf7/0xf90 [ 39.414751] vb2_core_create_bufs+0x401/0x8c0 [ 39.419240] vb2_create_bufs+0x3c6/0x7f0 [ 39.423298] vb2_ioctl_create_bufs+0x25e/0x3d0 [ 39.427877] v4l_create_bufs+0x152/0x230 [ 39.431925] __video_do_ioctl+0x8b1/0x1050 [ 39.436191] video_usercopy+0x5c1/0x1760 [ 39.440244] video_ioctl2+0x2c/0x33 [ 39.443858] v4l2_ioctl+0x154/0x1b0 [ 39.447473] do_vfs_ioctl+0x1de/0x1790 [ 39.451360] ksys_ioctl+0xa9/0xd0 [ 39.454799] __x64_sys_ioctl+0x73/0xb0 [ 39.458673] do_syscall_64+0x1b9/0x820 [ 39.462544] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.467712] [ 39.469330] Freed by task 6063: [ 39.472595] save_stack+0x43/0xd0 [ 39.476031] __kasan_slab_free+0x102/0x150 [ 39.480251] kasan_slab_free+0xe/0x10 [ 39.484039] kfree+0xcf/0x230 [ 39.487129] __vb2_queue_free+0x5e2/0xa30 [ 39.491270] vb2_core_queue_release+0x62/0x80 [ 39.495781] _vb2_fop_release+0x1d2/0x2b0 [ 39.499932] vb2_fop_release+0x77/0xc0 [ 39.503806] vivid_fop_release+0x18e/0x440 [ 39.508032] v4l2_release+0x224/0x3a0 [ 39.511824] __fput+0x385/0xa30 [ 39.515088] ____fput+0x15/0x20 [ 39.518351] task_work_run+0x1e8/0x2a0 [ 39.522224] do_exit+0x1ad6/0x26d0 [ 39.525756] do_group_exit+0x177/0x440 [ 39.529664] __x64_sys_exit_group+0x3e/0x50 [ 39.533978] do_syscall_64+0x1b9/0x820 [ 39.537856] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.543024] [ 39.544643] The buggy address belongs to the object at ffff8881ccc42d80 [ 39.544643] which belongs to the cache kmalloc-1k of size 1024 [ 39.557298] The buggy address is located 0 bytes inside of [ 39.557298] 1024-byte region [ffff8881ccc42d80, ffff8881ccc43180) [ 39.569078] The buggy address belongs to the page: [ 39.573999] page:ffffea0007331080 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0x0 compound_mapcount: 0 [ 39.583959] flags: 0x2fffc0000010200(slab|head) [ 39.588626] raw: 02fffc0000010200 ffffea0007347288 ffffea0007332988 ffff8881da800ac0 [ 39.596492] raw: 0000000000000000 ffff8881ccc42000 0000000100000007 0000000000000000 [ 39.604352] page dumped because: kasan: bad access detected [ 39.610041] [ 39.611650] Memory state around the buggy address: [ 39.616561] ffff8881ccc42c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.623913] ffff8881ccc42d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.631261] >ffff8881ccc42d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.638603] ^ [ 39.641977] ffff8881ccc42e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.649323] ffff8881ccc42e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.656661] ================================================================== [ 39.664003] Disabling lock debugging due to kernel taint [ 39.671494] Kernel panic - not syncing: panic_on_warn set ... [ 39.677410] CPU: 0 PID: 6068 Comm: syz-executor444 Tainted: G B 4.20.0-rc4+ #353 [ 39.686243] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.695579] Call Trace: [ 39.698155] dump_stack+0x244/0x39d [ 39.701772] ? dump_stack_print_info.cold.1+0x20/0x20 [ 39.706950] panic+0x2ad/0x55c [ 39.710128] ? add_taint.cold.5+0x16/0x16 [ 39.714263] ? preempt_schedule+0x4d/0x60 [ 39.718405] ? ___preempt_schedule+0x16/0x18 [ 39.722818] ? trace_hardirqs_on+0xb4/0x310 [ 39.727142] kasan_end_report+0x47/0x4f [ 39.731099] kasan_report.cold.8+0x76/0x309 [ 39.735652] ? vb2_mmap+0x662/0x6f0 [ 39.739267] __asan_report_load8_noabort+0x14/0x20 [ 39.744183] vb2_mmap+0x662/0x6f0 [ 39.747623] ? vb2_poll+0x1d0/0x1d0 [ 39.751237] vb2_fop_mmap+0x4b/0x70 [ 39.754848] v4l2_mmap+0x153/0x200 [ 39.758394] mmap_region+0xe85/0x1cd0 [ 39.762202] ? __x64_sys_brk+0x8b0/0x8b0 [ 39.766256] ? rcu_softirq_qs+0x20/0x20 [ 39.770248] ? mpx_unmapped_area_check+0xd8/0x108 [ 39.775093] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 39.780555] ? arch_get_unmapped_area+0x750/0x750 [ 39.785398] ? lock_acquire+0x1ed/0x520 [ 39.789356] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 39.794367] ? cap_mmap_addr+0x52/0x130 [ 39.798341] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.803882] ? security_mmap_addr+0x80/0xa0 [ 39.808203] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.813728] ? get_unmapped_area+0x292/0x3b0 [ 39.818131] do_mmap+0xa22/0x1230 [ 39.821583] ? mmap_region+0x1cd0/0x1cd0 [ 39.825641] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 39.829690] ? down_read_killable+0x150/0x150 [ 39.834172] ? security_mmap_file+0x174/0x1b0 [ 39.838653] vm_mmap_pgoff+0x213/0x2c0 [ 39.842528] ? vma_is_stack_for_current+0xd0/0xd0 [ 39.847357] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.852875] ? __fget_light+0x2e9/0x430 [ 39.856831] ? fget_raw+0x20/0x20 [ 39.860276] ? up_read+0x225/0x2c0 [ 39.863819] ksys_mmap_pgoff+0x4da/0x660 [ 39.867879] ? do_syscall_64+0x9a/0x820 [ 39.871858] ? find_mergeable_anon_vma+0xd0/0xd0 [ 39.876603] ? trace_hardirqs_on+0xbd/0x310 [ 39.880910] ? security_file_ioctl+0x94/0xc0 [ 39.885308] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.890656] ? trace_hardirqs_off_caller+0x310/0x310 [ 39.895755] __x64_sys_mmap+0xe9/0x1b0 [ 39.899636] do_syscall_64+0x1b9/0x820 [ 39.903506] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 39.908854] ? syscall_return_slowpath+0x5e0/0x5e0 [ 39.913782] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.918625] ? trace_hardirqs_on_caller+0x310/0x310 [ 39.923629] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 39.928637] ? prepare_exit_to_usermode+0x291/0x3b0 [ 39.933638] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.938482] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.943656] RIP: 0033:0x444c89 [ 39.946839] 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.965723] RSP: 002b:00007ffc42fec548 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 39.973427] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444c89 [ 39.980697] RDX: fffffffffffffffd RSI: 0000000000002000 RDI: 0000000020ffe000 [ 39.987950] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 39.995204] R10: 0000000000000011 R11: 0000000000000212 R12: 0000000000401f40 [ 40.002561] R13: 0000000000401fd0 R14: 0000000000000000 R15: 0000000000000000 [ 40.010773] Kernel Offset: disabled [ 40.014398] Rebooting in 86400 seconds..