[....] 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. [ 28.964061] kauditd_printk_skb: 7 callbacks suppressed [ 28.964073] audit: type=1800 audit(1543465197.141:29): pid=5877 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 [ 28.992017] audit: type=1800 audit(1543465197.151:30): pid=5877 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: [ 33.492221] sshd (6015) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.10.47' (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 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 [ 40.235223] ================================================================== [ 40.242766] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 40.248737] Read of size 8 at addr ffff8881cd419240 by task syz-executor916/6078 [ 40.256254] [ 40.257878] CPU: 1 PID: 6078 Comm: syz-executor916 Not tainted 4.20.0-rc4+ #256 [ 40.265494] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.274857] Call Trace: [ 40.278135] dump_stack+0x244/0x39d [ 40.281762] ? dump_stack_print_info.cold.1+0x20/0x20 [ 40.286950] ? printk+0xa7/0xcf [ 40.290233] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 40.295008] print_address_description.cold.7+0x9/0x1ff [ 40.300367] kasan_report.cold.8+0x242/0x309 [ 40.304773] ? vb2_mmap+0x662/0x6f0 [ 40.308399] __asan_report_load8_noabort+0x14/0x20 [ 40.313331] vb2_mmap+0x662/0x6f0 [ 40.316809] ? vb2_poll+0x1d0/0x1d0 [ 40.320453] vb2_fop_mmap+0x4b/0x70 [ 40.324082] v4l2_mmap+0x153/0x200 [ 40.327622] mmap_region+0xe85/0x1cd0 [ 40.331425] ? __x64_sys_brk+0x8b0/0x8b0 [ 40.335487] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 40.340798] ? rcu_softirq_qs+0x20/0x20 [ 40.344793] ? mpx_unmapped_area_check+0xd8/0x108 [ 40.349692] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 40.355152] ? arch_get_unmapped_area+0x750/0x750 [ 40.360021] ? lock_acquire+0x1ed/0x520 [ 40.364002] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 40.369017] ? cap_mmap_addr+0x52/0x130 [ 40.372987] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 40.378547] ? security_mmap_addr+0x80/0xa0 [ 40.382881] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 40.388416] ? get_unmapped_area+0x292/0x3b0 [ 40.392821] do_mmap+0xa22/0x1230 [ 40.396273] ? mmap_region+0x1cd0/0x1cd0 [ 40.401070] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 40.405129] ? down_read_killable+0x150/0x150 [ 40.409637] ? security_mmap_file+0x174/0x1b0 [ 40.414151] vm_mmap_pgoff+0x213/0x2c0 [ 40.418053] ? vma_is_stack_for_current+0xd0/0xd0 [ 40.422894] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 40.428426] ? v4l2_compat_ioctl32+0x178/0x5cf0 [ 40.433091] ? fget_raw+0x20/0x20 [ 40.436562] ? rcu_read_lock_sched_held+0x14f/0x180 [ 40.441907] ksys_mmap_pgoff+0x4da/0x660 [ 40.445979] ? do_fast_syscall_32+0x150/0xfb2 [ 40.450496] ? find_mergeable_anon_vma+0xd0/0xd0 [ 40.455291] ? trace_hardirqs_on+0xbd/0x310 [ 40.459623] ? entry_SYSENTER_compat+0x70/0x7f [ 40.464216] ? trace_hardirqs_off_caller+0x310/0x310 [ 40.469318] __ia32_sys_mmap_pgoff+0xdd/0x1a0 [ 40.473815] do_fast_syscall_32+0x34d/0xfb2 [ 40.478142] ? do_int80_syscall_32+0x890/0x890 [ 40.482721] ? entry_SYSENTER_compat+0x68/0x7f [ 40.487313] ? trace_hardirqs_off_caller+0xbb/0x310 [ 40.492337] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.497172] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.502011] ? trace_hardirqs_on_caller+0x310/0x310 [ 40.507111] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 40.512134] ? prepare_exit_to_usermode+0x291/0x3b0 [ 40.517162] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.522004] entry_SYSENTER_compat+0x70/0x7f [ 40.526407] RIP: 0023:0xf7f5da29 [ 40.529769] 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 [ 40.548666] RSP: 002b:00000000fff68a2c EFLAGS: 00000286 ORIG_RAX: 00000000000000c0 [ 40.556364] RAX: ffffffffffffffda RBX: 0000000020ffe000 RCX: 0000000000002000 [ 40.563640] RDX: 00000000fffffffd RSI: 0000000000000011 RDI: 0000000000000003 [ 40.570916] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 40.578177] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 40.585439] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 40.592715] [ 40.594334] Allocated by task 6075: [ 40.597956] save_stack+0x43/0xd0 [ 40.601403] kasan_kmalloc+0xc7/0xe0 [ 40.605825] __kmalloc+0x15b/0x760 [ 40.609362] __vb2_queue_alloc+0xf7/0xf90 [ 40.613517] vb2_core_create_bufs+0x401/0x8c0 [ 40.618044] vb2_create_bufs+0x3c6/0x7f0 [ 40.622200] vb2_ioctl_create_bufs+0x25e/0x3d0 [ 40.626776] v4l_create_bufs+0x152/0x230 [ 40.630837] __video_do_ioctl+0x8b1/0x1050 [ 40.635077] video_usercopy+0x5c1/0x1760 [ 40.639142] video_ioctl2+0x2c/0x33 [ 40.642774] v4l2_ioctl+0x154/0x1b0 [ 40.646396] v4l2_compat_ioctl32+0x3e5/0x5cf0 [ 40.650889] __ia32_compat_sys_ioctl+0x20e/0x630 [ 40.655643] do_fast_syscall_32+0x34d/0xfb2 [ 40.660042] entry_SYSENTER_compat+0x70/0x7f [ 40.664449] [ 40.666075] Freed by task 6075: [ 40.669544] save_stack+0x43/0xd0 [ 40.673018] __kasan_slab_free+0x102/0x150 [ 40.677250] kasan_slab_free+0xe/0x10 [ 40.681050] kfree+0xcf/0x230 [ 40.684163] __vb2_queue_free+0x5e2/0xa30 [ 40.688410] vb2_core_queue_release+0x62/0x80 [ 40.692911] _vb2_fop_release+0x1d2/0x2b0 [ 40.697059] vb2_fop_release+0x77/0xc0 [ 40.700955] vivid_fop_release+0x18e/0x440 [ 40.705272] v4l2_release+0x224/0x3a0 [ 40.709086] __fput+0x385/0xa30 [ 40.712376] ____fput+0x15/0x20 [ 40.715651] task_work_run+0x1e8/0x2a0 [ 40.719558] do_exit+0x1ad6/0x26d0 [ 40.723114] do_group_exit+0x177/0x440 [ 40.727007] __ia32_sys_exit_group+0x3e/0x50 [ 40.731415] do_fast_syscall_32+0x34d/0xfb2 [ 40.735735] entry_SYSENTER_compat+0x70/0x7f [ 40.740131] [ 40.741767] The buggy address belongs to the object at ffff8881cd419240 [ 40.741767] which belongs to the cache kmalloc-1k of size 1024 [ 40.754558] The buggy address is located 0 bytes inside of [ 40.754558] 1024-byte region [ffff8881cd419240, ffff8881cd419640) [ 40.766636] The buggy address belongs to the page: [ 40.771586] page:ffffea0007350600 count:1 mapcount:0 mapping:ffff8881da800ac0 index:0x0 compound_mapcount: 0 [ 40.781566] flags: 0x2fffc0000010200(slab|head) [ 40.786230] raw: 02fffc0000010200 ffffea000736f208 ffffea0007331188 ffff8881da800ac0 [ 40.794105] raw: 0000000000000000 ffff8881cd418040 0000000100000007 0000000000000000 [ 40.801979] page dumped because: kasan: bad access detected [ 40.807696] [ 40.809327] Memory state around the buggy address: [ 40.814250] ffff8881cd419100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.821607] ffff8881cd419180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 40.828973] >ffff8881cd419200: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb executing program [ 40.836321] ^ [ 40.841767] ffff8881cd419280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.849121] ffff8881cd419300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.856475] ================================================================== [ 40.863837] Disabling lock debugging due to kernel taint [ 40.870273] Kernel panic - not syncing: panic_on_warn set ... [ 40.876459] CPU: 1 PID: 6078 Comm: syz-executor916 Tainted: G B 4.20.0-rc4+ #256 [ 40.885311] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.894673] Call Trace: [ 40.897265] dump_stack+0x244/0x39d [ 40.900899] ? dump_stack_print_info.cold.1+0x20/0x20 [ 40.906177] panic+0x2ad/0x55c [ 40.909374] ? add_taint.cold.5+0x16/0x16 [ 40.913549] ? preempt_schedule+0x4d/0x60 [ 40.917702] ? ___preempt_schedule+0x16/0x18 [ 40.922119] ? trace_hardirqs_on+0xb4/0x310 [ 40.926443] kasan_end_report+0x47/0x4f [ 40.930423] kasan_report.cold.8+0x76/0x309 [ 40.934739] ? vb2_mmap+0x662/0x6f0 [ 40.938360] __asan_report_load8_noabort+0x14/0x20 [ 40.943280] vb2_mmap+0x662/0x6f0 [ 40.946734] ? vb2_poll+0x1d0/0x1d0 [ 40.950366] vb2_fop_mmap+0x4b/0x70 [ 40.954000] v4l2_mmap+0x153/0x200 [ 40.957553] mmap_region+0xe85/0x1cd0 [ 40.961349] ? __x64_sys_brk+0x8b0/0x8b0 [ 40.965402] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 40.970673] ? rcu_softirq_qs+0x20/0x20 [ 40.974648] ? mpx_unmapped_area_check+0xd8/0x108 [ 40.979487] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 40.985035] ? arch_get_unmapped_area+0x750/0x750 [ 40.989879] ? lock_acquire+0x1ed/0x520 [ 40.993863] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 40.998885] ? cap_mmap_addr+0x52/0x130 [ 41.002863] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 41.008404] ? security_mmap_addr+0x80/0xa0 [ 41.012720] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.018252] ? get_unmapped_area+0x292/0x3b0 [ 41.022656] do_mmap+0xa22/0x1230 [ 41.026104] ? mmap_region+0x1cd0/0x1cd0 [ 41.030172] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 41.034241] ? down_read_killable+0x150/0x150 [ 41.038731] ? security_mmap_file+0x174/0x1b0 [ 41.043386] vm_mmap_pgoff+0x213/0x2c0 [ 41.047287] ? vma_is_stack_for_current+0xd0/0xd0 [ 41.052137] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 41.057676] ? v4l2_compat_ioctl32+0x178/0x5cf0 [ 41.062352] ? fget_raw+0x20/0x20 [ 41.065800] ? rcu_read_lock_sched_held+0x14f/0x180 [ 41.070812] ksys_mmap_pgoff+0x4da/0x660 [ 41.074880] ? do_fast_syscall_32+0x150/0xfb2 [ 41.079395] ? find_mergeable_anon_vma+0xd0/0xd0 [ 41.084156] ? trace_hardirqs_on+0xbd/0x310 [ 41.088478] ? entry_SYSENTER_compat+0x70/0x7f [ 41.093075] ? trace_hardirqs_off_caller+0x310/0x310 [ 41.098185] __ia32_sys_mmap_pgoff+0xdd/0x1a0 [ 41.102680] do_fast_syscall_32+0x34d/0xfb2 [ 41.106997] ? do_int80_syscall_32+0x890/0x890 [ 41.112071] ? entry_SYSENTER_compat+0x68/0x7f [ 41.116655] ? trace_hardirqs_off_caller+0xbb/0x310 [ 41.121667] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.126502] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.131355] ? trace_hardirqs_on_caller+0x310/0x310 [ 41.136380] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 41.141403] ? prepare_exit_to_usermode+0x291/0x3b0 [ 41.146414] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.151259] entry_SYSENTER_compat+0x70/0x7f [ 41.155678] RIP: 0023:0xf7f5da29 [ 41.159036] 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 [ 41.177926] RSP: 002b:00000000fff68a2c EFLAGS: 00000286 ORIG_RAX: 00000000000000c0 [ 41.185634] RAX: ffffffffffffffda RBX: 0000000020ffe000 RCX: 0000000000002000 [ 41.192909] RDX: 00000000fffffffd RSI: 0000000000000011 RDI: 0000000000000003 [ 41.200170] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 41.207471] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 41.214773] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 41.223815] Kernel Offset: disabled [ 41.227576] Rebooting in 86400 seconds..