[....] 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.178966] kauditd_printk_skb: 7 callbacks suppressed [ 27.178980] audit: type=1800 audit(1541387567.297:29): pid=5540 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.211292] audit: type=1800 audit(1541387567.297:30): pid=5540 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.110' (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 executing program executing program 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: [ 47.285166] ================================================================== [ 47.292719] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 47.298692] Read of size 8 at addr ffff8801d4f41680 by task syz-executor902/5730 [ 47.306204] [ 47.307823] CPU: 0 PID: 5730 Comm: syz-executor902 Not tainted 4.19.0+ #320 [ 47.314905] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.324245] Call Trace: [ 47.326823] dump_stack+0x244/0x39d [ 47.330450] ? dump_stack_print_info.cold.1+0x20/0x20 [ 47.335631] ? printk+0xa7/0xcf [ 47.338896] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 47.343649] print_address_description.cold.7+0x9/0x1ff [ 47.349015] kasan_report.cold.8+0x242/0x309 [ 47.353452] ? vb2_mmap+0x662/0x6f0 [ 47.357090] __asan_report_load8_noabort+0x14/0x20 [ 47.362006] vb2_mmap+0x662/0x6f0 [ 47.365459] ? vb2_poll+0x1d0/0x1d0 [ 47.369073] vb2_fop_mmap+0x4b/0x70 [ 47.372699] v4l2_mmap+0x153/0x200 [ 47.376247] mmap_region+0xe85/0x1cd0 [ 47.380044] ? __x64_sys_brk+0x8b0/0x8b0 [ 47.384104] ? zap_class+0x640/0x640 [ 47.387831] ? mpx_unmapped_area_check+0xd8/0x108 [ 47.392706] ? arch_get_unmapped_area+0x750/0x750 [ 47.397543] ? lock_acquire+0x1ed/0x520 [ 47.401509] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 47.406518] ? cap_mmap_addr+0x52/0x130 [ 47.410481] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.416009] ? security_mmap_addr+0x80/0xa0 [ 47.420330] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 47.425871] ? get_unmapped_area+0x292/0x3b0 [ 47.430283] do_mmap+0xa22/0x1230 [ 47.433757] ? mmap_region+0x1cd0/0x1cd0 [ 47.437819] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 47.441873] ? down_read_killable+0x150/0x150 [ 47.446359] ? security_mmap_file+0x174/0x1b0 [ 47.450846] vm_mmap_pgoff+0x213/0x2c0 [ 47.454729] ? vma_is_stack_for_current+0xd0/0xd0 [ 47.459561] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.465098] ? security_file_permission+0x1c2/0x220 [ 47.470112] ksys_mmap_pgoff+0x4da/0x660 [ 47.474301] ? do_syscall_64+0x9a/0x820 [ 47.478266] ? find_mergeable_anon_vma+0xd0/0xd0 [ 47.483009] ? trace_hardirqs_on+0xbd/0x310 [ 47.487319] ? __ia32_sys_read+0xb0/0xb0 [ 47.491382] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.496775] ? trace_hardirqs_off_caller+0x310/0x310 [ 47.501871] __x64_sys_mmap+0xe9/0x1b0 [ 47.505755] do_syscall_64+0x1b9/0x820 [ 47.509634] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 47.514988] ? syscall_return_slowpath+0x5e0/0x5e0 [ 47.519903] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.524737] ? trace_hardirqs_on_caller+0x310/0x310 [ 47.529751] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 47.534768] ? prepare_exit_to_usermode+0x291/0x3b0 [ 47.539772] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.544625] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.549801] RIP: 0033:0x444b89 [ 47.552980] 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 [ 47.571875] RSP: 002b:00007fffbf920608 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 47.579586] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444b89 [ 47.586846] RDX: 0000000000000003 RSI: 0000000000003000 RDI: 0000000020ffd000 [ 47.594101] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 47.601368] R10: 0000000000000011 R11: 0000000000000216 R12: 000000000000b874 [ 47.608663] R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000 [ 47.616051] [ 47.617673] Allocated by task 5728: [ 47.621304] save_stack+0x43/0xd0 [ 47.624742] kasan_kmalloc+0xc7/0xe0 [ 47.628456] __kmalloc+0x15b/0x760 [ 47.631991] __vb2_queue_alloc+0xf7/0xf90 [ 47.636134] vb2_core_reqbufs+0x971/0x1040 [ 47.640357] __vb2_init_fileio+0x344/0xc90 [ 47.644582] __vb2_perform_fileio+0xcfd/0x1210 [ 47.649150] vb2_write+0x38/0x50 [ 47.652505] vb2_fop_write+0x20a/0x400 [ 47.656399] v4l2_write+0x168/0x220 [ 47.660042] __vfs_write+0x119/0x9f0 [ 47.663743] vfs_write+0x1fc/0x560 [ 47.667289] ksys_write+0x101/0x260 [ 47.670917] __x64_sys_write+0x73/0xb0 [ 47.674793] do_syscall_64+0x1b9/0x820 [ 47.678671] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.683853] [ 47.685474] Freed by task 5728: [ 47.688757] save_stack+0x43/0xd0 [ 47.692195] __kasan_slab_free+0x102/0x150 [ 47.696429] kasan_slab_free+0xe/0x10 [ 47.700247] kfree+0xcf/0x230 [ 47.703365] __vb2_queue_free+0x5e2/0xa30 [ 47.707503] vb2_core_reqbufs+0x2da/0x1040 [ 47.711726] __vb2_cleanup_fileio+0xf0/0x160 [ 47.716132] vb2_core_queue_release+0x1e/0x80 [ 47.720641] _vb2_fop_release+0x1d2/0x2b0 [ 47.724788] vb2_fop_release+0x77/0xc0 [ 47.728671] vivid_fop_release+0x18e/0x440 [ 47.732911] v4l2_release+0x224/0x3a0 [ 47.736710] __fput+0x385/0xa30 [ 47.739988] ____fput+0x15/0x20 [ 47.743267] task_work_run+0x1e8/0x2a0 [ 47.747154] exit_to_usermode_loop+0x318/0x380 [ 47.751722] do_syscall_64+0x6be/0x820 [ 47.755598] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.760770] [ 47.762386] The buggy address belongs to the object at ffff8801d4f41680 [ 47.762386] which belongs to the cache kmalloc-1k of size 1024 [ 47.775034] The buggy address is located 0 bytes inside of [ 47.775034] 1024-byte region [ffff8801d4f41680, ffff8801d4f41a80) [ 47.786820] The buggy address belongs to the page: [ 47.791735] page:ffffea000753d000 count:1 mapcount:0 mapping:ffff8801da800ac0 index:0x0 compound_mapcount: 0 [ 47.801705] flags: 0x2fffc0000010200(slab|head) [ 47.806361] raw: 02fffc0000010200 ffffea0007536788 ffffea000753d508 ffff8801da800ac0 [ 47.814232] raw: 0000000000000000 ffff8801d4f40000 0000000100000007 0000000000000000 [ 47.822105] page dumped because: kasan: bad access detected [ 47.827798] [ 47.829410] Memory state around the buggy address: executing program [ 47.834337] ffff8801d4f41580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.841690] ffff8801d4f41600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.849032] >ffff8801d4f41680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.856373] ^ [ 47.859727] ffff8801d4f41700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.867071] ffff8801d4f41780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.874413] ================================================================== [ 47.881786] Disabling lock debugging due to kernel taint [ 47.891696] Kernel panic - not syncing: panic_on_warn set ... [ 47.897581] CPU: 0 PID: 5730 Comm: syz-executor902 Tainted: G B 4.19.0+ #320 [ 47.906050] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.915402] Call Trace: [ 47.917987] dump_stack+0x244/0x39d [ 47.921603] ? dump_stack_print_info.cold.1+0x20/0x20 [ 47.926787] panic+0x2ad/0x55c [ 47.929967] ? add_taint.cold.5+0x16/0x16 [ 47.934113] ? preempt_schedule+0x4d/0x60 [ 47.938265] ? ___preempt_schedule+0x16/0x18 [ 47.942660] ? trace_hardirqs_on+0xb4/0x310 [ 47.946968] kasan_end_report+0x47/0x4f [ 47.950926] kasan_report.cold.8+0x76/0x309 [ 47.955248] ? vb2_mmap+0x662/0x6f0 [ 47.958865] __asan_report_load8_noabort+0x14/0x20 [ 47.963780] vb2_mmap+0x662/0x6f0 [ 47.967222] ? vb2_poll+0x1d0/0x1d0 [ 47.970833] vb2_fop_mmap+0x4b/0x70 [ 47.974453] v4l2_mmap+0x153/0x200 [ 47.977981] mmap_region+0xe85/0x1cd0 [ 47.981771] ? __x64_sys_brk+0x8b0/0x8b0 [ 47.985816] ? zap_class+0x640/0x640 [ 47.989537] ? mpx_unmapped_area_check+0xd8/0x108 [ 47.994370] ? arch_get_unmapped_area+0x750/0x750 [ 47.999215] ? lock_acquire+0x1ed/0x520 [ 48.003177] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 48.008209] ? cap_mmap_addr+0x52/0x130 [ 48.012187] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.017712] ? security_mmap_addr+0x80/0xa0 [ 48.022035] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.027562] ? get_unmapped_area+0x292/0x3b0 [ 48.031957] do_mmap+0xa22/0x1230 [ 48.035401] ? mmap_region+0x1cd0/0x1cd0 [ 48.039461] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 48.043516] ? down_read_killable+0x150/0x150 [ 48.048008] ? security_mmap_file+0x174/0x1b0 [ 48.052491] vm_mmap_pgoff+0x213/0x2c0 [ 48.056368] ? vma_is_stack_for_current+0xd0/0xd0 [ 48.061195] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.066716] ? security_file_permission+0x1c2/0x220 [ 48.071724] ksys_mmap_pgoff+0x4da/0x660 [ 48.075772] ? do_syscall_64+0x9a/0x820 [ 48.079735] ? find_mergeable_anon_vma+0xd0/0xd0 [ 48.084478] ? trace_hardirqs_on+0xbd/0x310 [ 48.088785] ? __ia32_sys_read+0xb0/0xb0 [ 48.092833] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.098190] ? trace_hardirqs_off_caller+0x310/0x310 [ 48.103295] __x64_sys_mmap+0xe9/0x1b0 [ 48.107168] do_syscall_64+0x1b9/0x820 [ 48.111039] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 48.116387] ? syscall_return_slowpath+0x5e0/0x5e0 [ 48.121303] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.126133] ? trace_hardirqs_on_caller+0x310/0x310 [ 48.131136] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 48.136156] ? prepare_exit_to_usermode+0x291/0x3b0 [ 48.141160] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.145993] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.151167] RIP: 0033:0x444b89 [ 48.154347] 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 [ 48.173247] RSP: 002b:00007fffbf920608 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 48.180955] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444b89 [ 48.188227] RDX: 0000000000000003 RSI: 0000000000003000 RDI: 0000000020ffd000 [ 48.195483] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 48.202735] R10: 0000000000000011 R11: 0000000000000216 R12: 000000000000b874 [ 48.209996] R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000 [ 48.218157] Kernel Offset: disabled [ 48.221781] Rebooting in 86400 seconds..