[....] 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. [ 26.978642] kauditd_printk_skb: 7 callbacks suppressed [ 26.978654] audit: type=1800 audit(1540911294.841:29): pid=5551 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.004498] audit: type=1800 audit(1540911294.851:30): pid=5551 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.10.46' (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: [ 34.584080] ================================================================== [ 34.591615] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 34.597607] Read of size 8 at addr ffff8801ba995d40 by task syz-executor375/5717 [ 34.605123] [ 34.606742] CPU: 1 PID: 5717 Comm: syz-executor375 Not tainted 4.19.0+ #311 [ 34.613820] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.623166] Call Trace: [ 34.625760] dump_stack+0x244/0x39d [ 34.629383] ? dump_stack_print_info.cold.1+0x20/0x20 [ 34.634560] ? printk+0xa7/0xcf [ 34.637848] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 34.642609] print_address_description.cold.7+0x9/0x1ff [ 34.647973] kasan_report.cold.8+0x242/0x309 [ 34.652368] ? vb2_mmap+0x65f/0x6e0 [ 34.655985] __asan_report_load8_noabort+0x14/0x20 [ 34.660904] vb2_mmap+0x65f/0x6e0 [ 34.664352] ? vb2_poll+0x1d0/0x1d0 [ 34.667966] vb2_fop_mmap+0x4b/0x70 [ 34.671581] v4l2_mmap+0x153/0x200 [ 34.675109] mmap_region+0xe85/0x1cd0 [ 34.678903] ? __x64_sys_brk+0x8b0/0x8b0 [ 34.682951] ? zap_class+0x640/0x640 [ 34.686681] ? mpx_unmapped_area_check+0xd8/0x108 [ 34.691529] ? arch_get_unmapped_area+0x750/0x750 [ 34.696358] ? lock_acquire+0x1ed/0x520 [ 34.700319] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 34.705415] ? cap_mmap_addr+0x52/0x130 [ 34.709378] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.714909] ? security_mmap_addr+0x80/0xa0 [ 34.719218] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 34.724775] ? get_unmapped_area+0x292/0x3b0 [ 34.729181] do_mmap+0xa22/0x1230 [ 34.732625] ? mmap_region+0x1cd0/0x1cd0 [ 34.736680] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 34.740741] ? down_read_killable+0x150/0x150 [ 34.745242] ? security_mmap_file+0x174/0x1b0 [ 34.749772] vm_mmap_pgoff+0x213/0x2c0 [ 34.753673] ? vma_is_stack_for_current+0xd0/0xd0 [ 34.758500] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 34.764024] ? security_file_permission+0x1c2/0x220 [ 34.769051] ksys_mmap_pgoff+0x4da/0x660 [ 34.773111] ? do_syscall_64+0x9a/0x820 [ 34.777073] ? find_mergeable_anon_vma+0xd0/0xd0 [ 34.781821] ? trace_hardirqs_on+0xbd/0x310 [ 34.786133] ? __ia32_sys_read+0xb0/0xb0 [ 34.790185] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.795544] ? trace_hardirqs_off_caller+0x310/0x310 [ 34.800655] __x64_sys_mmap+0xe9/0x1b0 [ 34.804577] do_syscall_64+0x1b9/0x820 [ 34.808467] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 34.813830] ? syscall_return_slowpath+0x5e0/0x5e0 [ 34.818749] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.823585] ? trace_hardirqs_on_caller+0x310/0x310 [ 34.828591] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 34.833611] ? prepare_exit_to_usermode+0x291/0x3b0 [ 34.838615] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.843480] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.848669] RIP: 0033:0x444ba9 [ 34.851850] 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 [ 34.870735] RSP: 002b:00007ffe59649268 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 34.878450] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 34.885720] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 34.892989] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 34.900245] R10: 0000000000000013 R11: 0000000000000216 R12: 00000000000086eb [ 34.907522] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 34.914821] [ 34.916451] Allocated by task 5718: [ 34.920069] save_stack+0x43/0xd0 [ 34.923508] kasan_kmalloc+0xc7/0xe0 [ 34.927215] __kmalloc+0x15b/0x760 [ 34.930753] __vb2_queue_alloc+0xf7/0xf20 [ 34.934884] vb2_core_reqbufs+0x971/0x1040 [ 34.939764] __vb2_init_fileio+0x344/0xc90 [ 34.944026] __vb2_perform_fileio+0xcfb/0x1210 [ 34.948591] vb2_write+0x38/0x50 [ 34.951939] vb2_fop_write+0x20a/0x400 [ 34.955820] v4l2_write+0x168/0x220 [ 34.959433] __vfs_write+0x119/0x9f0 [ 34.963129] vfs_write+0x1fc/0x560 [ 34.966651] ksys_write+0x101/0x260 [ 34.970261] __x64_sys_write+0x73/0xb0 [ 34.974133] do_syscall_64+0x1b9/0x820 [ 34.978021] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.983201] [ 34.984833] Freed by task 5718: [ 34.988122] save_stack+0x43/0xd0 [ 34.991582] __kasan_slab_free+0x102/0x150 [ 34.995820] kasan_slab_free+0xe/0x10 [ 34.999609] kfree+0xcf/0x230 [ 35.002699] __vb2_queue_free+0x5e2/0xa30 [ 35.006834] vb2_core_reqbufs+0x2da/0x1040 [ 35.011061] __vb2_cleanup_fileio+0xf0/0x160 [ 35.015471] vb2_core_queue_release+0x1e/0x80 [ 35.019975] _vb2_fop_release+0x1d2/0x2b0 [ 35.024111] vb2_fop_release+0x77/0xc0 [ 35.027984] vivid_fop_release+0x18e/0x440 [ 35.032216] v4l2_release+0xfb/0x1a0 [ 35.035944] __fput+0x385/0xa30 [ 35.039211] ____fput+0x15/0x20 [ 35.042483] task_work_run+0x1e8/0x2a0 [ 35.046361] exit_to_usermode_loop+0x318/0x380 [ 35.050934] do_syscall_64+0x6be/0x820 [ 35.054836] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.060016] [ 35.061636] The buggy address belongs to the object at ffff8801ba995d40 [ 35.061636] which belongs to the cache kmalloc-512 of size 512 [ 35.074285] The buggy address is located 0 bytes inside of [ 35.074285] 512-byte region [ffff8801ba995d40, ffff8801ba995f40) [ 35.085986] The buggy address belongs to the page: [ 35.090902] page:ffffea0006ea6540 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 35.099062] flags: 0x2fffc0000000200(slab) [ 35.103283] raw: 02fffc0000000200 ffffea0006eac208 ffffea0006eaafc8 ffff8801da800940 [ 35.111150] raw: 0000000000000000 ffff8801ba9950c0 0000000100000006 0000000000000000 [ 35.119006] page dumped because: kasan: bad access detected [ 35.124692] [ 35.126307] Memory state around the buggy address: executing program [ 35.131251] ffff8801ba995c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.138593] ffff8801ba995c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 35.145937] >ffff8801ba995d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 35.153276] ^ [ 35.158720] ffff8801ba995d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.166082] ffff8801ba995e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.173443] ================================================================== [ 35.180802] Disabling lock debugging due to kernel taint [ 35.190780] Kernel panic - not syncing: panic_on_warn set ... [ 35.190780] [ 35.198154] CPU: 1 PID: 5717 Comm: syz-executor375 Tainted: G B 4.19.0+ #311 [ 35.206623] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.215958] Call Trace: [ 35.218534] dump_stack+0x244/0x39d [ 35.222148] ? dump_stack_print_info.cold.1+0x20/0x20 [ 35.227333] panic+0x238/0x4e7 [ 35.230520] ? add_taint.cold.5+0x16/0x16 [ 35.234663] ? preempt_schedule+0x4d/0x60 [ 35.238803] ? ___preempt_schedule+0x16/0x18 [ 35.243199] ? trace_hardirqs_on+0xb4/0x310 [ 35.247509] kasan_end_report+0x47/0x4f [ 35.251478] kasan_report.cold.8+0x76/0x309 [ 35.255804] ? vb2_mmap+0x65f/0x6e0 [ 35.259420] __asan_report_load8_noabort+0x14/0x20 [ 35.264336] vb2_mmap+0x65f/0x6e0 [ 35.267774] ? vb2_poll+0x1d0/0x1d0 [ 35.271392] vb2_fop_mmap+0x4b/0x70 [ 35.275018] v4l2_mmap+0x153/0x200 [ 35.278546] mmap_region+0xe85/0x1cd0 [ 35.282336] ? __x64_sys_brk+0x8b0/0x8b0 [ 35.286383] ? zap_class+0x640/0x640 [ 35.290089] ? mpx_unmapped_area_check+0xd8/0x108 [ 35.294925] ? arch_get_unmapped_area+0x750/0x750 [ 35.299770] ? lock_acquire+0x1ed/0x520 [ 35.303746] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 35.308752] ? cap_mmap_addr+0x52/0x130 [ 35.312710] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 35.318233] ? security_mmap_addr+0x80/0xa0 [ 35.323930] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 35.329450] ? get_unmapped_area+0x292/0x3b0 [ 35.333844] do_mmap+0xa22/0x1230 [ 35.337283] ? mmap_region+0x1cd0/0x1cd0 [ 35.341345] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 35.345420] ? down_read_killable+0x150/0x150 [ 35.349904] ? security_mmap_file+0x174/0x1b0 [ 35.354387] vm_mmap_pgoff+0x213/0x2c0 [ 35.358259] ? vma_is_stack_for_current+0xd0/0xd0 [ 35.363086] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 35.368621] ? security_file_permission+0x1c2/0x220 [ 35.373626] ksys_mmap_pgoff+0x4da/0x660 [ 35.377674] ? do_syscall_64+0x9a/0x820 [ 35.381632] ? find_mergeable_anon_vma+0xd0/0xd0 [ 35.386375] ? trace_hardirqs_on+0xbd/0x310 [ 35.390682] ? __ia32_sys_read+0xb0/0xb0 [ 35.394744] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.400104] ? trace_hardirqs_off_caller+0x310/0x310 [ 35.405205] __x64_sys_mmap+0xe9/0x1b0 [ 35.409082] do_syscall_64+0x1b9/0x820 [ 35.412955] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 35.418305] ? syscall_return_slowpath+0x5e0/0x5e0 [ 35.423221] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.428053] ? trace_hardirqs_on_caller+0x310/0x310 [ 35.433054] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 35.438054] ? prepare_exit_to_usermode+0x291/0x3b0 [ 35.443064] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 35.447898] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.453070] RIP: 0033:0x444ba9 [ 35.456248] 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 [ 35.475135] RSP: 002b:00007ffe59649268 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 35.482827] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 35.490081] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 35.497338] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 35.504845] R10: 0000000000000013 R11: 0000000000000216 R12: 00000000000086eb [ 35.512116] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 35.520300] Kernel Offset: disabled [ 35.523932] Rebooting in 86400 seconds..