[....] 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.750177] kauditd_printk_skb: 7 callbacks suppressed [ 27.750188] audit: type=1800 audit(1540900082.458:29): pid=5537 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.782262] audit: type=1800 audit(1540900082.458:30): pid=5537 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.124' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 46.544954] ================================================================== [ 46.552503] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 46.558473] Read of size 8 at addr ffff8801d836a580 by task syz-executor763/5701 [ 46.566051] [ 46.567684] CPU: 0 PID: 5701 Comm: syz-executor763 Not tainted 4.19.0+ #310 [ 46.574785] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.584124] Call Trace: [ 46.586698] dump_stack+0x244/0x39d [ 46.590314] ? dump_stack_print_info.cold.1+0x20/0x20 [ 46.595502] ? printk+0xa7/0xcf [ 46.598794] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 46.603705] print_address_description.cold.7+0x9/0x1ff [ 46.609273] kasan_report.cold.8+0x242/0x309 [ 46.613686] ? vb2_mmap+0x65f/0x6e0 [ 46.617311] __asan_report_load8_noabort+0x14/0x20 [ 46.622229] vb2_mmap+0x65f/0x6e0 [ 46.625674] ? vb2_poll+0x1d0/0x1d0 [ 46.629288] vb2_fop_mmap+0x4b/0x70 [ 46.632928] v4l2_mmap+0x153/0x200 [ 46.636471] mmap_region+0xe85/0x1cd0 [ 46.640263] ? __x64_sys_brk+0x8b0/0x8b0 [ 46.644311] ? zap_class+0x640/0x640 [ 46.648024] ? mpx_unmapped_area_check+0xd8/0x108 [ 46.652859] ? arch_get_unmapped_area+0x750/0x750 [ 46.657693] ? lock_acquire+0x1ed/0x520 [ 46.661655] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 46.666657] ? cap_mmap_addr+0x52/0x130 [ 46.670617] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 46.676140] ? security_mmap_addr+0x80/0xa0 [ 46.680459] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 46.685997] ? get_unmapped_area+0x292/0x3b0 [ 46.690410] do_mmap+0xa22/0x1230 [ 46.693850] ? mmap_region+0x1cd0/0x1cd0 [ 46.697912] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 46.701981] ? down_read_killable+0x150/0x150 [ 46.706466] ? security_mmap_file+0x174/0x1b0 [ 46.710978] vm_mmap_pgoff+0x213/0x2c0 [ 46.714866] ? vma_is_stack_for_current+0xd0/0xd0 [ 46.719813] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 46.725344] ? security_file_permission+0x1c2/0x220 [ 46.730374] ksys_mmap_pgoff+0x4da/0x660 [ 46.734439] ? do_syscall_64+0x9a/0x820 [ 46.738429] ? find_mergeable_anon_vma+0xd0/0xd0 [ 46.743179] ? trace_hardirqs_on+0xbd/0x310 [ 46.747492] ? __ia32_sys_read+0xb0/0xb0 [ 46.751545] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.756901] ? trace_hardirqs_off_caller+0x310/0x310 [ 46.762009] __x64_sys_mmap+0xe9/0x1b0 [ 46.765899] do_syscall_64+0x1b9/0x820 [ 46.769787] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 46.775139] ? syscall_return_slowpath+0x5e0/0x5e0 [ 46.780058] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 46.784889] ? trace_hardirqs_on_caller+0x310/0x310 [ 46.789899] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 46.794913] ? prepare_exit_to_usermode+0x291/0x3b0 [ 46.799940] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 46.804779] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.809957] RIP: 0033:0x444ba9 [ 46.813138] 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 [ 46.832029] RSP: 002b:00007ffec55e1a88 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 46.839733] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 46.846988] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 46.854240] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 46.861493] R10: 0000000000000013 R11: 0000000000000212 R12: 0000000000401e60 [ 46.868746] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 46.876020] [ 46.877645] Allocated by task 5700: [ 46.881259] save_stack+0x43/0xd0 [ 46.884694] kasan_kmalloc+0xc7/0xe0 [ 46.888398] __kmalloc+0x15b/0x760 [ 46.891954] __vb2_queue_alloc+0xf7/0xf20 [ 46.896095] vb2_core_reqbufs+0x971/0x1040 [ 46.900322] __vb2_init_fileio+0x344/0xc90 [ 46.904539] __vb2_perform_fileio+0xcfb/0x1210 [ 46.909104] vb2_write+0x38/0x50 [ 46.912453] vb2_fop_write+0x20a/0x400 [ 46.916328] v4l2_write+0x168/0x220 [ 46.919947] __vfs_write+0x119/0x9f0 [ 46.923661] vfs_write+0x1fc/0x560 [ 46.927459] ksys_write+0x101/0x260 [ 46.931072] __x64_sys_write+0x73/0xb0 [ 46.934960] do_syscall_64+0x1b9/0x820 [ 46.938842] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 46.944062] [ 46.945682] Freed by task 5700: [ 46.948964] save_stack+0x43/0xd0 [ 46.952411] __kasan_slab_free+0x102/0x150 [ 46.956631] kasan_slab_free+0xe/0x10 [ 46.960419] kfree+0xcf/0x230 [ 46.963523] __vb2_queue_free+0x5e2/0xa30 [ 46.967662] vb2_core_reqbufs+0x2da/0x1040 [ 46.971878] __vb2_cleanup_fileio+0xf0/0x160 [ 46.976277] vb2_core_queue_release+0x1e/0x80 [ 46.980757] _vb2_fop_release+0x1d2/0x2b0 [ 46.984889] vb2_fop_release+0x77/0xc0 [ 46.988835] vivid_fop_release+0x18e/0x440 [ 46.993084] v4l2_release+0xfb/0x1a0 [ 46.996788] __fput+0x385/0xa30 [ 47.000061] ____fput+0x15/0x20 [ 47.003341] task_work_run+0x1e8/0x2a0 [ 47.007241] exit_to_usermode_loop+0x318/0x380 [ 47.011946] do_syscall_64+0x6be/0x820 [ 47.015823] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.021019] [ 47.022670] The buggy address belongs to the object at ffff8801d836a580 [ 47.022670] which belongs to the cache kmalloc-512 of size 512 [ 47.035326] The buggy address is located 0 bytes inside of [ 47.035326] 512-byte region [ffff8801d836a580, ffff8801d836a780) [ 47.047009] The buggy address belongs to the page: [ 47.051939] page:ffffea000760da80 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 47.060067] flags: 0x2fffc0000000200(slab) [ 47.064290] raw: 02fffc0000000200 ffffea0007616548 ffffea000760df08 ffff8801da800940 [ 47.072155] raw: 0000000000000000 ffff8801d836a080 0000000100000006 0000000000000000 [ 47.080013] page dumped because: kasan: bad access detected [ 47.085703] [ 47.087314] Memory state around the buggy address: executing program [ 47.092240] ffff8801d836a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.099582] ffff8801d836a500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 47.108320] >ffff8801d836a580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.115659] ^ [ 47.119014] ffff8801d836a600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.126363] ffff8801d836a680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.133704] ================================================================== [ 47.141056] Disabling lock debugging due to kernel taint [ 47.150817] Kernel panic - not syncing: panic_on_warn set ... [ 47.150817] [ 47.158177] CPU: 0 PID: 5701 Comm: syz-executor763 Tainted: G B 4.19.0+ #310 [ 47.166648] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.175981] Call Trace: [ 47.178568] dump_stack+0x244/0x39d [ 47.182194] ? dump_stack_print_info.cold.1+0x20/0x20 [ 47.187373] panic+0x238/0x4e7 [ 47.190552] ? add_taint.cold.5+0x16/0x16 [ 47.194747] ? preempt_schedule+0x4d/0x60 [ 47.198888] ? ___preempt_schedule+0x16/0x18 [ 47.203284] ? trace_hardirqs_on+0xb4/0x310 [ 47.207605] kasan_end_report+0x47/0x4f [ 47.211582] kasan_report.cold.8+0x76/0x309 [ 47.215971] ? vb2_mmap+0x65f/0x6e0 [ 47.219590] __asan_report_load8_noabort+0x14/0x20 [ 47.224505] vb2_mmap+0x65f/0x6e0 [ 47.227948] ? vb2_poll+0x1d0/0x1d0 [ 47.231562] vb2_fop_mmap+0x4b/0x70 [ 47.235254] v4l2_mmap+0x153/0x200 [ 47.238789] mmap_region+0xe85/0x1cd0 [ 47.242588] ? __x64_sys_brk+0x8b0/0x8b0 [ 47.246647] ? zap_class+0x640/0x640 [ 47.250365] ? mpx_unmapped_area_check+0xd8/0x108 [ 47.255194] ? arch_get_unmapped_area+0x750/0x750 [ 47.260033] ? lock_acquire+0x1ed/0x520 [ 47.264000] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 47.269003] ? cap_mmap_addr+0x52/0x130 [ 47.272965] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.278484] ? security_mmap_addr+0x80/0xa0 [ 47.282792] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 47.288313] ? get_unmapped_area+0x292/0x3b0 [ 47.292705] do_mmap+0xa22/0x1230 [ 47.296141] ? mmap_region+0x1cd0/0x1cd0 [ 47.300188] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 47.304246] ? down_read_killable+0x150/0x150 [ 47.308745] ? security_mmap_file+0x174/0x1b0 [ 47.313236] vm_mmap_pgoff+0x213/0x2c0 [ 47.317110] ? vma_is_stack_for_current+0xd0/0xd0 [ 47.321955] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.327498] ? security_file_permission+0x1c2/0x220 [ 47.332513] ksys_mmap_pgoff+0x4da/0x660 [ 47.336556] ? do_syscall_64+0x9a/0x820 [ 47.340515] ? find_mergeable_anon_vma+0xd0/0xd0 [ 47.345261] ? trace_hardirqs_on+0xbd/0x310 [ 47.349583] ? __ia32_sys_read+0xb0/0xb0 [ 47.353634] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.358985] ? trace_hardirqs_off_caller+0x310/0x310 [ 47.364129] __x64_sys_mmap+0xe9/0x1b0 [ 47.368017] do_syscall_64+0x1b9/0x820 [ 47.371889] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 47.377241] ? syscall_return_slowpath+0x5e0/0x5e0 [ 47.382373] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.387222] ? trace_hardirqs_on_caller+0x310/0x310 [ 47.392225] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 47.397224] ? prepare_exit_to_usermode+0x291/0x3b0 [ 47.402227] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 47.407056] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.412272] RIP: 0033:0x444ba9 [ 47.415460] 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.434350] RSP: 002b:00007ffec55e1a88 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 47.442065] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 47.449332] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 47.456593] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 47.463860] R10: 0000000000000013 R11: 0000000000000212 R12: 0000000000401e60 [ 47.471113] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 47.479406] Kernel Offset: disabled [ 47.483032] Rebooting in 86400 seconds..