[....] 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.244277] kauditd_printk_skb: 7 callbacks suppressed [ 27.244290] audit: type=1800 audit(1540930452.373:29): pid=5557 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.272060] audit: type=1800 audit(1540930452.383:30): pid=5557 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: [ 30.919803] sshd (5697) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.0.87' (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 [ 37.523202] ================================================================== [ 37.530722] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 37.536689] Read of size 8 at addr ffff8801d8252cc0 by task syz-executor962/5746 [ 37.544205] [ 37.545822] CPU: 0 PID: 5746 Comm: syz-executor962 Not tainted 4.19.0+ #214 [ 37.552907] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.562252] Call Trace: [ 37.564832] dump_stack+0x244/0x39d [ 37.568475] ? dump_stack_print_info.cold.1+0x20/0x20 [ 37.573666] ? printk+0xa7/0xcf [ 37.576969] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 37.581733] print_address_description.cold.7+0x9/0x1ff [ 37.587104] kasan_report.cold.8+0x242/0x309 [ 37.591501] ? vb2_mmap+0x65f/0x6e0 [ 37.595117] __asan_report_load8_noabort+0x14/0x20 [ 37.600041] vb2_mmap+0x65f/0x6e0 [ 37.603497] ? vb2_poll+0x1d0/0x1d0 [ 37.607143] vb2_fop_mmap+0x4b/0x70 [ 37.610807] v4l2_mmap+0x153/0x200 [ 37.614334] mmap_region+0xe85/0x1cd0 [ 37.618124] ? __x64_sys_brk+0x8b0/0x8b0 [ 37.622183] ? zap_class+0x640/0x640 [ 37.625902] ? __kernel_text_address+0xd/0x40 [ 37.630386] ? mpx_unmapped_area_check+0xd8/0x108 [ 37.635223] ? arch_get_unmapped_area+0x750/0x750 [ 37.640059] ? lock_acquire+0x1ed/0x520 [ 37.644034] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 37.649062] ? cap_mmap_addr+0x52/0x130 [ 37.653060] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 37.658587] ? security_mmap_addr+0x80/0xa0 [ 37.662915] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 37.668450] ? get_unmapped_area+0x292/0x3b0 [ 37.672863] do_mmap+0xa22/0x1230 [ 37.676316] ? mmap_region+0x1cd0/0x1cd0 [ 37.680377] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 37.684434] ? down_read_killable+0x150/0x150 [ 37.688935] ? security_mmap_file+0x174/0x1b0 [ 37.693437] vm_mmap_pgoff+0x213/0x2c0 [ 37.697332] ? vma_is_stack_for_current+0xd0/0xd0 [ 37.702168] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 37.707701] ? security_file_permission+0x1c2/0x220 [ 37.712731] ksys_mmap_pgoff+0x4da/0x660 [ 37.716781] ? do_fast_syscall_32+0x150/0xfb2 [ 37.721264] ? find_mergeable_anon_vma+0xd0/0xd0 [ 37.726008] ? trace_hardirqs_on+0xbd/0x310 [ 37.730343] ? __ia32_sys_read+0xb0/0xb0 [ 37.734399] ? entry_SYSENTER_compat+0x70/0x7f [ 37.738970] ? trace_hardirqs_off_caller+0x310/0x310 [ 37.744092] __ia32_sys_mmap_pgoff+0xdd/0x1a0 [ 37.748611] do_fast_syscall_32+0x34d/0xfb2 [ 37.752938] ? do_int80_syscall_32+0x890/0x890 [ 37.757508] ? entry_SYSENTER_compat+0x68/0x7f [ 37.762094] ? trace_hardirqs_off_caller+0xbb/0x310 [ 37.767113] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.771951] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.776791] ? trace_hardirqs_on_caller+0x310/0x310 [ 37.781809] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 37.786814] ? prepare_exit_to_usermode+0x291/0x3b0 [ 37.791837] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 37.796686] entry_SYSENTER_compat+0x70/0x7f [ 37.801080] RIP: 0023:0xf7f3aa29 [ 37.804437] Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 37.823328] RSP: 002b:00000000ffe833bc EFLAGS: 00000286 ORIG_RAX: 00000000000000c0 [ 37.831089] RAX: ffffffffffffffda RBX: 0000000020fff000 RCX: 0000000000001000 [ 37.838365] RDX: 0000000002000002 RSI: 0000000000000013 RDI: 0000000000000003 [ 37.845634] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 37.852904] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 37.860199] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 37.867476] [ 37.869104] Allocated by task 5745: [ 37.872721] save_stack+0x43/0xd0 [ 37.876161] kasan_kmalloc+0xc7/0xe0 [ 37.879882] __kmalloc+0x15b/0x760 [ 37.883408] __vb2_queue_alloc+0xf7/0xf20 [ 37.887549] vb2_core_reqbufs+0x971/0x1040 [ 37.891767] __vb2_init_fileio+0x344/0xc90 [ 37.895994] __vb2_perform_fileio+0xcfb/0x1210 [ 37.900605] vb2_write+0x38/0x50 [ 37.903976] vb2_fop_write+0x20a/0x400 [ 37.907887] v4l2_write+0x168/0x220 [ 37.911524] __vfs_write+0x119/0x9f0 [ 37.915235] vfs_write+0x1fc/0x560 [ 37.918765] ksys_write+0x101/0x260 [ 37.922388] __ia32_sys_write+0x71/0xb0 [ 37.926349] do_fast_syscall_32+0x34d/0xfb2 [ 37.930666] entry_SYSENTER_compat+0x70/0x7f [ 37.935073] [ 37.936690] Freed by task 5745: [ 37.939956] save_stack+0x43/0xd0 [ 37.943393] __kasan_slab_free+0x102/0x150 [ 37.947610] kasan_slab_free+0xe/0x10 [ 37.951393] kfree+0xcf/0x230 [ 37.954483] __vb2_queue_free+0x5e2/0xa30 [ 37.958628] vb2_core_reqbufs+0x2da/0x1040 [ 37.962876] __vb2_cleanup_fileio+0xf0/0x160 [ 37.967288] vb2_core_queue_release+0x1e/0x80 [ 37.971788] _vb2_fop_release+0x1d2/0x2b0 [ 37.975935] vb2_fop_release+0x77/0xc0 [ 37.979832] vivid_fop_release+0x18e/0x440 [ 37.984056] v4l2_release+0xfb/0x1a0 [ 37.987753] __fput+0x385/0xa30 [ 37.991016] ____fput+0x15/0x20 [ 37.994298] task_work_run+0x1e8/0x2a0 [ 37.998172] exit_to_usermode_loop+0x318/0x380 [ 38.002741] do_fast_syscall_32+0xcd5/0xfb2 [ 38.007053] entry_SYSENTER_compat+0x70/0x7f [ 38.011441] [ 38.013063] The buggy address belongs to the object at ffff8801d8252cc0 [ 38.013063] which belongs to the cache kmalloc-512 of size 512 [ 38.025713] The buggy address is located 0 bytes inside of [ 38.025713] 512-byte region [ffff8801d8252cc0, ffff8801d8252ec0) [ 38.037414] The buggy address belongs to the page: [ 38.042360] page:ffffea0007609480 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 38.050499] flags: 0x2fffc0000000200(slab) [ 38.054724] raw: 02fffc0000000200 ffffea00076228c8 ffffea00075f3808 ffff8801da800940 [ 38.062588] raw: 0000000000000000 ffff8801d8252040 0000000100000006 0000000000000000 [ 38.070458] page dumped because: kasan: bad access detected [ 38.076148] [ 38.077757] Memory state around the buggy address: [ 38.082677] ffff8801d8252b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.090038] ffff8801d8252c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 38.097416] >ffff8801d8252c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 38.104803] ^ [ 38.110239] ffff8801d8252d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.117592] ffff8801d8252d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.124931] ================================================================== [ 38.132505] Disabling lock debugging due to kernel taint [ 38.138761] Kernel panic - not syncing: panic_on_warn set ... [ 38.138761] [ 38.146611] CPU: 0 PID: 5746 Comm: syz-executor962 Tainted: G B 4.19.0+ #214 [ 38.155089] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.164437] Call Trace: [ 38.167013] dump_stack+0x244/0x39d [ 38.170638] ? dump_stack_print_info.cold.1+0x20/0x20 [ 38.175816] panic+0x238/0x4e7 [ 38.178995] ? add_taint.cold.5+0x16/0x16 [ 38.183147] ? preempt_schedule+0x4d/0x60 [ 38.187302] ? ___preempt_schedule+0x16/0x18 [ 38.191709] ? trace_hardirqs_on+0xb4/0x310 [ 38.196029] kasan_end_report+0x47/0x4f [ 38.199995] kasan_report.cold.8+0x76/0x309 [ 38.204321] ? vb2_mmap+0x65f/0x6e0 [ 38.207952] __asan_report_load8_noabort+0x14/0x20 [ 38.212866] vb2_mmap+0x65f/0x6e0 [ 38.216309] ? vb2_poll+0x1d0/0x1d0 [ 38.219927] vb2_fop_mmap+0x4b/0x70 [ 38.223566] v4l2_mmap+0x153/0x200 [ 38.227090] mmap_region+0xe85/0x1cd0 [ 38.230877] ? __x64_sys_brk+0x8b0/0x8b0 [ 38.234924] ? zap_class+0x640/0x640 [ 38.238625] ? __kernel_text_address+0xd/0x40 [ 38.243117] ? mpx_unmapped_area_check+0xd8/0x108 [ 38.247963] ? arch_get_unmapped_area+0x750/0x750 [ 38.252809] ? lock_acquire+0x1ed/0x520 [ 38.256790] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 38.261794] ? cap_mmap_addr+0x52/0x130 [ 38.265750] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 38.271274] ? security_mmap_addr+0x80/0xa0 [ 38.275584] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 38.281117] ? get_unmapped_area+0x292/0x3b0 [ 38.285523] do_mmap+0xa22/0x1230 [ 38.288961] ? mmap_region+0x1cd0/0x1cd0 [ 38.293016] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 38.297092] ? down_read_killable+0x150/0x150 [ 38.301585] ? security_mmap_file+0x174/0x1b0 [ 38.306070] vm_mmap_pgoff+0x213/0x2c0 [ 38.309948] ? vma_is_stack_for_current+0xd0/0xd0 [ 38.314774] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 38.320299] ? security_file_permission+0x1c2/0x220 [ 38.325320] ksys_mmap_pgoff+0x4da/0x660 [ 38.329386] ? do_fast_syscall_32+0x150/0xfb2 [ 38.333865] ? find_mergeable_anon_vma+0xd0/0xd0 [ 38.338607] ? trace_hardirqs_on+0xbd/0x310 [ 38.342915] ? __ia32_sys_read+0xb0/0xb0 [ 38.346965] ? entry_SYSENTER_compat+0x70/0x7f [ 38.351545] ? trace_hardirqs_off_caller+0x310/0x310 [ 38.356664] __ia32_sys_mmap_pgoff+0xdd/0x1a0 [ 38.361158] do_fast_syscall_32+0x34d/0xfb2 [ 38.365467] ? do_int80_syscall_32+0x890/0x890 [ 38.370043] ? entry_SYSENTER_compat+0x68/0x7f [ 38.374630] ? trace_hardirqs_off_caller+0xbb/0x310 [ 38.379628] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.384456] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.389297] ? trace_hardirqs_on_caller+0x310/0x310 [ 38.394306] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 38.399324] ? prepare_exit_to_usermode+0x291/0x3b0 [ 38.404341] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.409187] entry_SYSENTER_compat+0x70/0x7f [ 38.413602] RIP: 0023:0xf7f3aa29 [ 38.416952] Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 [ 38.435836] RSP: 002b:00000000ffe833bc EFLAGS: 00000286 ORIG_RAX: 00000000000000c0 [ 38.443544] RAX: ffffffffffffffda RBX: 0000000020fff000 RCX: 0000000000001000 [ 38.450810] RDX: 0000000002000002 RSI: 0000000000000013 RDI: 0000000000000003 [ 38.458071] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 38.465322] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 38.472574] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 38.480662] Kernel Offset: disabled [ 38.484284] Rebooting in 86400 seconds..