[....] 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.494657] kauditd_printk_skb: 7 callbacks suppressed [ 27.494669] audit: type=1800 audit(1540909619.136:29): pid=5555 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.522715] audit: type=1800 audit(1540909619.136:30): pid=5555 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: [ 37.001593] sshd (5693) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.0.33' (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 [ 43.552582] ================================================================== [ 43.560156] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 43.566125] Read of size 8 at addr ffff8801bc70bac0 by task syz-executor584/5723 [ 43.573649] [ 43.575282] CPU: 0 PID: 5723 Comm: syz-executor584 Not tainted 4.19.0-next-20181030+ #101 [ 43.583579] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.592922] Call Trace: [ 43.595502] dump_stack+0x244/0x39d [ 43.599121] ? dump_stack_print_info.cold.1+0x20/0x20 [ 43.604311] ? printk+0xa7/0xcf [ 43.607608] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 43.612356] print_address_description.cold.7+0x9/0x1ff [ 43.617707] kasan_report.cold.8+0x242/0x309 [ 43.622105] ? vb2_mmap+0x65f/0x6e0 [ 43.625733] __asan_report_load8_noabort+0x14/0x20 [ 43.630652] vb2_mmap+0x65f/0x6e0 [ 43.634093] ? vb2_poll+0x1d0/0x1d0 [ 43.637704] vb2_fop_mmap+0x4b/0x70 [ 43.641336] v4l2_mmap+0x153/0x200 [ 43.644881] mmap_region+0xe85/0x1cd0 [ 43.648674] ? __x64_sys_brk+0x8b0/0x8b0 [ 43.652723] ? zap_class+0x640/0x640 [ 43.656436] ? mpx_unmapped_area_check+0xd8/0x108 [ 43.661279] ? arch_get_unmapped_area+0x750/0x750 [ 43.666122] ? lock_acquire+0x1ed/0x520 [ 43.670098] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 43.675114] ? cap_mmap_addr+0x52/0x130 [ 43.679089] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 43.684658] ? security_mmap_addr+0x80/0xa0 [ 43.688969] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 43.694500] ? get_unmapped_area+0x292/0x3b0 [ 43.698910] do_mmap+0xa22/0x1230 [ 43.702381] ? mmap_region+0x1cd0/0x1cd0 [ 43.706437] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 43.710490] ? down_read_killable+0x150/0x150 [ 43.714975] ? security_mmap_file+0x174/0x1b0 [ 43.719477] vm_mmap_pgoff+0x213/0x2c0 [ 43.723359] ? vma_is_stack_for_current+0xd0/0xd0 [ 43.728190] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 43.733715] ? security_file_permission+0x1c2/0x220 [ 43.738731] ksys_mmap_pgoff+0x4da/0x660 [ 43.742780] ? do_syscall_64+0x9a/0x820 [ 43.746754] ? find_mergeable_anon_vma+0xd0/0xd0 [ 43.751519] ? trace_hardirqs_on+0xbd/0x310 [ 43.755829] ? __ia32_sys_read+0xb0/0xb0 [ 43.759878] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.765231] ? trace_hardirqs_off_caller+0x300/0x300 [ 43.770333] __x64_sys_mmap+0xe9/0x1b0 [ 43.774211] do_syscall_64+0x1b9/0x820 [ 43.778112] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 43.783496] ? syscall_return_slowpath+0x5e0/0x5e0 [ 43.788419] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 43.793270] ? trace_hardirqs_on_caller+0x310/0x310 [ 43.798292] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 43.803298] ? prepare_exit_to_usermode+0x291/0x3b0 [ 43.808304] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 43.813137] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.818314] RIP: 0033:0x444ba9 [ 43.821497] 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 [ 43.840392] RSP: 002b:00007ffd311a2088 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 43.848101] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 43.855378] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 43.862633] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 43.869895] R10: 0000000000000013 R11: 0000000000000212 R12: 000000000000a9ef [ 43.877183] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 43.884446] [ 43.886065] Allocated by task 5721: [ 43.889696] save_stack+0x43/0xd0 [ 43.893144] kasan_kmalloc+0xc7/0xe0 [ 43.896868] __kmalloc+0x15b/0x760 [ 43.900411] __vb2_queue_alloc+0xf7/0xf20 [ 43.904560] vb2_core_reqbufs+0x971/0x1040 [ 43.908808] __vb2_init_fileio+0x344/0xc90 [ 43.913030] __vb2_perform_fileio+0xcfb/0x1210 [ 43.917620] vb2_write+0x38/0x50 [ 43.920975] vb2_fop_write+0x20a/0x400 [ 43.924852] v4l2_write+0x168/0x220 [ 43.928465] __vfs_write+0x119/0x9f0 [ 43.932175] vfs_write+0x1fc/0x560 [ 43.935711] ksys_write+0x101/0x260 [ 43.939323] __x64_sys_write+0x73/0xb0 [ 43.943215] do_syscall_64+0x1b9/0x820 [ 43.947112] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.952283] [ 43.953901] Freed by task 5721: [ 43.957183] save_stack+0x43/0xd0 [ 43.960629] __kasan_slab_free+0x102/0x150 [ 43.964865] kasan_slab_free+0xe/0x10 [ 43.968668] kfree+0xcf/0x230 [ 43.971769] __vb2_queue_free+0x5e2/0xa30 [ 43.975929] vb2_core_reqbufs+0x2da/0x1040 [ 43.980151] __vb2_cleanup_fileio+0xf0/0x160 [ 43.984547] vb2_core_queue_release+0x1e/0x80 [ 43.989048] _vb2_fop_release+0x1d2/0x2b0 [ 43.993197] vb2_fop_release+0x77/0xc0 [ 43.997080] vivid_fop_release+0x18e/0x440 [ 44.001303] v4l2_release+0xfb/0x1a0 [ 44.005011] __fput+0x3bc/0xa70 [ 44.008285] ____fput+0x15/0x20 [ 44.011568] task_work_run+0x1e8/0x2a0 [ 44.015468] exit_to_usermode_loop+0x318/0x380 [ 44.020037] do_syscall_64+0x6be/0x820 [ 44.023915] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.029103] [ 44.030732] The buggy address belongs to the object at ffff8801bc70bac0 [ 44.030732] which belongs to the cache kmalloc-512 of size 512 [ 44.043376] The buggy address is located 0 bytes inside of [ 44.043376] 512-byte region [ffff8801bc70bac0, ffff8801bc70bcc0) [ 44.055063] The buggy address belongs to the page: [ 44.059979] page:ffffea0006f1c2c0 count:1 mapcount:0 mapping:ffff8801da800940 index:0xffff8801bc70b340 [ 44.069408] flags: 0x2fffc0000000200(slab) [ 44.073630] raw: 02fffc0000000200 ffffea0006ed6188 ffffea0006f46408 ffff8801da800940 [ 44.081507] raw: ffff8801bc70b340 ffff8801bc70b0c0 0000000100000005 0000000000000000 [ 44.089390] page dumped because: kasan: bad access detected [ 44.095094] [ 44.096702] Memory state around the buggy address: [ 44.101616] ffff8801bc70b980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.108960] ffff8801bc70ba00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 44.116319] >ffff8801bc70ba80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 44.123668] ^ [ 44.129106] ffff8801bc70bb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.136449] ffff8801bc70bb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.143815] ================================================================== [ 44.151154] Disabling lock debugging due to kernel taint [ 44.157191] Kernel panic - not syncing: panic_on_warn set ... [ 44.163105] CPU: 0 PID: 5723 Comm: syz-executor584 Tainted: G B 4.19.0-next-20181030+ #101 [ 44.172810] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.182147] Call Trace: [ 44.184729] dump_stack+0x244/0x39d [ 44.188343] ? dump_stack_print_info.cold.1+0x20/0x20 [ 44.193539] panic+0x2ad/0x55c [ 44.196729] ? add_taint.cold.5+0x16/0x16 [ 44.200876] ? preempt_schedule+0x4d/0x60 [ 44.205019] ? ___preempt_schedule+0x16/0x18 [ 44.209417] ? trace_hardirqs_on+0xb4/0x310 [ 44.213723] kasan_end_report+0x47/0x4f [ 44.217683] kasan_report.cold.8+0x76/0x309 [ 44.221992] ? vb2_mmap+0x65f/0x6e0 [ 44.225604] __asan_report_load8_noabort+0x14/0x20 [ 44.230514] vb2_mmap+0x65f/0x6e0 [ 44.233954] ? vb2_poll+0x1d0/0x1d0 [ 44.237583] vb2_fop_mmap+0x4b/0x70 [ 44.241198] v4l2_mmap+0x153/0x200 [ 44.244730] mmap_region+0xe85/0x1cd0 [ 44.248518] ? __x64_sys_brk+0x8b0/0x8b0 [ 44.252597] ? zap_class+0x640/0x640 [ 44.256304] ? mpx_unmapped_area_check+0xd8/0x108 [ 44.261139] ? arch_get_unmapped_area+0x750/0x750 [ 44.265970] ? lock_acquire+0x1ed/0x520 [ 44.269931] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 44.274933] ? cap_mmap_addr+0x52/0x130 [ 44.278893] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 44.284415] ? security_mmap_addr+0x80/0xa0 [ 44.288723] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 44.294246] ? get_unmapped_area+0x292/0x3b0 [ 44.298653] do_mmap+0xa22/0x1230 [ 44.302093] ? mmap_region+0x1cd0/0x1cd0 [ 44.306141] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 44.310190] ? down_read_killable+0x150/0x150 [ 44.314669] ? security_mmap_file+0x174/0x1b0 [ 44.319150] vm_mmap_pgoff+0x213/0x2c0 [ 44.323028] ? vma_is_stack_for_current+0xd0/0xd0 [ 44.327860] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 44.333385] ? security_file_permission+0x1c2/0x220 [ 44.338396] ksys_mmap_pgoff+0x4da/0x660 [ 44.342444] ? do_syscall_64+0x9a/0x820 [ 44.346402] ? find_mergeable_anon_vma+0xd0/0xd0 [ 44.351161] ? trace_hardirqs_on+0xbd/0x310 [ 44.355468] ? __ia32_sys_read+0xb0/0xb0 [ 44.359526] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.364887] ? trace_hardirqs_off_caller+0x300/0x300 [ 44.369979] __x64_sys_mmap+0xe9/0x1b0 [ 44.373853] do_syscall_64+0x1b9/0x820 [ 44.377725] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 44.383078] ? syscall_return_slowpath+0x5e0/0x5e0 [ 44.387991] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.392821] ? trace_hardirqs_on_caller+0x310/0x310 [ 44.397837] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 44.402840] ? prepare_exit_to_usermode+0x291/0x3b0 [ 44.407844] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.412690] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.417879] RIP: 0033:0x444ba9 [ 44.421064] 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 [ 44.439950] RSP: 002b:00007ffd311a2088 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 44.447640] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 44.454908] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 44.462161] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 44.469413] R10: 0000000000000013 R11: 0000000000000212 R12: 000000000000a9ef [ 44.476667] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 44.484912] Kernel Offset: disabled [ 44.488536] Rebooting in 86400 seconds..