[....] 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.008212] kauditd_printk_skb: 8 callbacks suppressed [ 27.008224] audit: type=1800 audit(1541315795.398:29): pid=5532 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.043036] audit: type=1800 audit(1541315795.398:30): pid=5532 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: [ 47.141485] sshd (5673) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.10.21' (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 [ 53.744006] ================================================================== [ 53.751521] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 53.757510] Read of size 8 at addr ffff8801d441c000 by task syz-executor121/5707 [ 53.765039] [ 53.766667] CPU: 0 PID: 5707 Comm: syz-executor121 Not tainted 4.19.0+ #318 [ 53.773776] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.783201] Call Trace: [ 53.785777] dump_stack+0x244/0x39d [ 53.789407] ? dump_stack_print_info.cold.1+0x20/0x20 [ 53.794591] ? printk+0xa7/0xcf [ 53.797864] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 53.802642] print_address_description.cold.7+0x9/0x1ff [ 53.808004] kasan_report.cold.8+0x242/0x309 [ 53.812396] ? vb2_mmap+0x662/0x6f0 [ 53.816009] __asan_report_load8_noabort+0x14/0x20 [ 53.820930] vb2_mmap+0x662/0x6f0 [ 53.824389] ? vb2_poll+0x1d0/0x1d0 [ 53.828035] vb2_fop_mmap+0x4b/0x70 [ 53.831650] v4l2_mmap+0x153/0x200 [ 53.835178] mmap_region+0xe85/0x1cd0 [ 53.838986] ? __x64_sys_brk+0x8b0/0x8b0 [ 53.843049] ? zap_class+0x640/0x640 [ 53.846776] ? mpx_unmapped_area_check+0xd8/0x108 [ 53.851633] ? arch_get_unmapped_area+0x750/0x750 [ 53.856466] ? lock_acquire+0x1ed/0x520 [ 53.860427] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 53.865434] ? cap_mmap_addr+0x52/0x130 [ 53.869393] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 53.874929] ? security_mmap_addr+0x80/0xa0 [ 53.879250] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 53.884772] ? get_unmapped_area+0x292/0x3b0 [ 53.889168] do_mmap+0xa22/0x1230 [ 53.892625] ? mmap_region+0x1cd0/0x1cd0 [ 53.896675] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 53.900722] ? down_read_killable+0x150/0x150 [ 53.905206] ? security_mmap_file+0x174/0x1b0 [ 53.909703] vm_mmap_pgoff+0x213/0x2c0 [ 53.913625] ? vma_is_stack_for_current+0xd0/0xd0 [ 53.918469] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 53.923996] ? security_file_permission+0x1c2/0x220 [ 53.929005] ksys_mmap_pgoff+0x4da/0x660 [ 53.933057] ? do_syscall_64+0x9a/0x820 [ 53.937055] ? find_mergeable_anon_vma+0xd0/0xd0 [ 53.941800] ? trace_hardirqs_on+0xbd/0x310 [ 53.946111] ? __ia32_sys_read+0xb0/0xb0 [ 53.950162] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 53.955511] ? trace_hardirqs_off_caller+0x310/0x310 [ 53.960616] __x64_sys_mmap+0xe9/0x1b0 [ 53.964498] do_syscall_64+0x1b9/0x820 [ 53.968400] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 53.973775] ? syscall_return_slowpath+0x5e0/0x5e0 [ 53.978704] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 53.983531] ? trace_hardirqs_on_caller+0x310/0x310 [ 53.988542] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 53.993555] ? prepare_exit_to_usermode+0x291/0x3b0 [ 53.998559] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.003401] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.008589] RIP: 0033:0x444b89 [ 54.011767] 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 [ 54.030662] RSP: 002b:00007ffce398bb58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 54.038365] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444b89 [ 54.045617] RDX: 0000000000000003 RSI: 0000000000003000 RDI: 0000000020ffd000 [ 54.052874] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 54.060156] R10: 0000000000000011 R11: 0000000000000212 R12: 000000000000d1b7 [ 54.067420] R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000 [ 54.074680] [ 54.076289] Allocated by task 5703: [ 54.079901] save_stack+0x43/0xd0 [ 54.083345] kasan_kmalloc+0xc7/0xe0 [ 54.087054] __kmalloc+0x15b/0x760 [ 54.090593] __vb2_queue_alloc+0xf7/0xf90 [ 54.094721] vb2_core_reqbufs+0x971/0x1040 [ 54.098986] __vb2_init_fileio+0x344/0xc90 [ 54.103227] __vb2_perform_fileio+0xcfd/0x1210 [ 54.107798] vb2_write+0x38/0x50 [ 54.111190] vb2_fop_write+0x20a/0x400 [ 54.115063] v4l2_write+0x168/0x220 [ 54.118675] __vfs_write+0x119/0x9f0 [ 54.122373] vfs_write+0x1fc/0x560 [ 54.125895] ksys_write+0x101/0x260 [ 54.129513] __x64_sys_write+0x73/0xb0 [ 54.133405] do_syscall_64+0x1b9/0x820 [ 54.137297] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.142476] [ 54.144085] Freed by task 5703: [ 54.147350] save_stack+0x43/0xd0 [ 54.150789] __kasan_slab_free+0x102/0x150 [ 54.155011] kasan_slab_free+0xe/0x10 [ 54.158833] kfree+0xcf/0x230 [ 54.161969] __vb2_queue_free+0x5e2/0xa30 [ 54.166100] vb2_core_reqbufs+0x2da/0x1040 [ 54.170344] __vb2_cleanup_fileio+0xf0/0x160 [ 54.174752] vb2_core_queue_release+0x1e/0x80 [ 54.179231] _vb2_fop_release+0x1d2/0x2b0 [ 54.183364] vb2_fop_release+0x77/0xc0 [ 54.187238] vivid_fop_release+0x18e/0x440 [ 54.191453] v4l2_release+0x224/0x3a0 [ 54.195239] __fput+0x385/0xa30 [ 54.198510] ____fput+0x15/0x20 [ 54.201774] task_work_run+0x1e8/0x2a0 [ 54.205650] exit_to_usermode_loop+0x318/0x380 [ 54.210235] do_syscall_64+0x6be/0x820 [ 54.214133] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.219306] [ 54.220932] The buggy address belongs to the object at ffff8801d441c000 [ 54.220932] which belongs to the cache kmalloc-1k of size 1024 [ 54.233574] The buggy address is located 0 bytes inside of [ 54.233574] 1024-byte region [ffff8801d441c000, ffff8801d441c400) [ 54.245338] The buggy address belongs to the page: [ 54.250261] page:ffffea0007510700 count:1 mapcount:0 mapping:ffff8801da800ac0 index:0x0 compound_mapcount: 0 [ 54.260214] flags: 0x2fffc0000010200(slab|head) [ 54.264878] raw: 02fffc0000010200 ffffea000752d188 ffffea0007510e08 ffff8801da800ac0 [ 54.272762] raw: 0000000000000000 ffff8801d441c000 0000000100000007 0000000000000000 [ 54.280635] page dumped because: kasan: bad access detected [ 54.286333] [ 54.287942] Memory state around the buggy address: [ 54.292862] ffff8801d441bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 54.300207] ffff8801d441bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 54.307550] >ffff8801d441c000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 54.314889] ^ [ 54.318244] ffff8801d441c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 54.325592] ffff8801d441c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 54.332946] ================================================================== [ 54.340292] Disabling lock debugging due to kernel taint [ 54.346271] Kernel panic - not syncing: panic_on_warn set ... [ 54.352205] CPU: 0 PID: 5707 Comm: syz-executor121 Tainted: G B 4.19.0+ #318 [ 54.360690] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 54.370063] Call Trace: [ 54.372631] dump_stack+0x244/0x39d [ 54.376248] ? dump_stack_print_info.cold.1+0x20/0x20 [ 54.381438] panic+0x2ad/0x55c [ 54.384616] ? add_taint.cold.5+0x16/0x16 [ 54.388750] ? preempt_schedule+0x4d/0x60 [ 54.392895] ? ___preempt_schedule+0x16/0x18 [ 54.397287] ? trace_hardirqs_on+0xb4/0x310 [ 54.401593] kasan_end_report+0x47/0x4f [ 54.405553] kasan_report.cold.8+0x76/0x309 [ 54.409872] ? vb2_mmap+0x662/0x6f0 [ 54.413485] __asan_report_load8_noabort+0x14/0x20 [ 54.418397] vb2_mmap+0x662/0x6f0 [ 54.421844] ? vb2_poll+0x1d0/0x1d0 [ 54.425467] vb2_fop_mmap+0x4b/0x70 [ 54.429077] v4l2_mmap+0x153/0x200 [ 54.432602] mmap_region+0xe85/0x1cd0 [ 54.436386] ? __x64_sys_brk+0x8b0/0x8b0 [ 54.440427] ? zap_class+0x640/0x640 [ 54.444142] ? mpx_unmapped_area_check+0xd8/0x108 [ 54.448971] ? arch_get_unmapped_area+0x750/0x750 [ 54.453797] ? lock_acquire+0x1ed/0x520 [ 54.457803] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 54.462807] ? cap_mmap_addr+0x52/0x130 [ 54.466767] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 54.472305] ? security_mmap_addr+0x80/0xa0 [ 54.476632] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 54.482177] ? get_unmapped_area+0x292/0x3b0 [ 54.486620] do_mmap+0xa22/0x1230 [ 54.490160] ? mmap_region+0x1cd0/0x1cd0 [ 54.494218] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 54.498262] ? down_read_killable+0x150/0x150 [ 54.502748] ? security_mmap_file+0x174/0x1b0 [ 54.507226] vm_mmap_pgoff+0x213/0x2c0 [ 54.511114] ? vma_is_stack_for_current+0xd0/0xd0 [ 54.515976] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 54.521495] ? security_file_permission+0x1c2/0x220 [ 54.526499] ksys_mmap_pgoff+0x4da/0x660 [ 54.530543] ? do_syscall_64+0x9a/0x820 [ 54.534504] ? find_mergeable_anon_vma+0xd0/0xd0 [ 54.539252] ? trace_hardirqs_on+0xbd/0x310 [ 54.543580] ? __ia32_sys_read+0xb0/0xb0 [ 54.547638] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.552987] ? trace_hardirqs_off_caller+0x310/0x310 [ 54.558087] __x64_sys_mmap+0xe9/0x1b0 [ 54.561989] do_syscall_64+0x1b9/0x820 [ 54.565870] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 54.571225] ? syscall_return_slowpath+0x5e0/0x5e0 [ 54.576142] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.580984] ? trace_hardirqs_on_caller+0x310/0x310 [ 54.585981] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 54.591009] ? prepare_exit_to_usermode+0x291/0x3b0 [ 54.596014] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.600845] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 54.606026] RIP: 0033:0x444b89 [ 54.609201] 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 [ 54.628082] RSP: 002b:00007ffce398bb58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 54.635769] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444b89 [ 54.643023] RDX: 0000000000000003 RSI: 0000000000003000 RDI: 0000000020ffd000 [ 54.650274] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 54.657527] R10: 0000000000000011 R11: 0000000000000212 R12: 000000000000d1b7 [ 54.664777] R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000 [ 54.672900] Kernel Offset: disabled [ 54.676525] Rebooting in 86400 seconds..