[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [ 26.947934] sshd (5621) used greatest stack depth: 14720 bytes left [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 27.189048] kauditd_printk_skb: 7 callbacks suppressed [ 27.189062] audit: type=1800 audit(1540897616.996:29): pid=5554 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.219495] audit: type=1800 audit(1540897616.996:30): pid=5554 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.63' (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 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 syzkaller login: [ 39.808763] ================================================================== [ 39.816372] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 39.822347] Read of size 8 at addr ffff8801d97902c0 by task syz-executor431/5771 [ 39.829992] [ 39.831624] CPU: 0 PID: 5771 Comm: syz-executor431 Not tainted 4.19.0+ #310 [ 39.838716] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.848064] Call Trace: [ 39.850642] dump_stack+0x244/0x39d [ 39.854289] ? dump_stack_print_info.cold.1+0x20/0x20 [ 39.859478] ? printk+0xa7/0xcf [ 39.862749] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 39.867506] print_address_description.cold.7+0x9/0x1ff [ 39.872890] kasan_report.cold.8+0x242/0x309 [ 39.877325] ? vb2_mmap+0x65f/0x6e0 [ 39.880965] __asan_report_load8_noabort+0x14/0x20 [ 39.885902] vb2_mmap+0x65f/0x6e0 [ 39.889350] ? vb2_poll+0x1d0/0x1d0 [ 39.893024] vb2_fop_mmap+0x4b/0x70 [ 39.896660] v4l2_mmap+0x153/0x200 [ 39.900207] mmap_region+0xe85/0x1cd0 [ 39.904025] ? __x64_sys_brk+0x8b0/0x8b0 [ 39.908113] ? zap_class+0x640/0x640 [ 39.911852] ? mpx_unmapped_area_check+0xd8/0x108 [ 39.916708] ? arch_get_unmapped_area+0x750/0x750 [ 39.921554] ? lock_acquire+0x1ed/0x520 [ 39.925518] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 39.930527] ? cap_mmap_addr+0x52/0x130 [ 39.934489] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.940029] ? security_mmap_addr+0x80/0xa0 [ 39.944346] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.949878] ? get_unmapped_area+0x292/0x3b0 [ 39.954307] do_mmap+0xa22/0x1230 [ 39.957783] ? mmap_region+0x1cd0/0x1cd0 [ 39.961861] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 39.965981] ? down_read_killable+0x150/0x150 [ 39.970476] ? security_mmap_file+0x174/0x1b0 [ 39.974980] vm_mmap_pgoff+0x213/0x2c0 [ 39.978884] ? vma_is_stack_for_current+0xd0/0xd0 [ 39.983907] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.989433] ? security_file_permission+0x1c2/0x220 [ 39.994441] ksys_mmap_pgoff+0x4da/0x660 [ 39.998490] ? do_syscall_64+0x9a/0x820 [ 40.002449] ? find_mergeable_anon_vma+0xd0/0xd0 [ 40.007204] ? trace_hardirqs_on+0xbd/0x310 [ 40.011510] ? __ia32_sys_read+0xb0/0xb0 [ 40.015556] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.020923] ? trace_hardirqs_off_caller+0x310/0x310 [ 40.026033] __x64_sys_mmap+0xe9/0x1b0 [ 40.029906] do_syscall_64+0x1b9/0x820 [ 40.033777] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 40.039126] ? syscall_return_slowpath+0x5e0/0x5e0 [ 40.044047] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.048878] ? trace_hardirqs_on_caller+0x310/0x310 [ 40.053882] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 40.058882] ? prepare_exit_to_usermode+0x291/0x3b0 [ 40.063997] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.068839] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.074024] RIP: 0033:0x444ba9 [ 40.077327] 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 [ 40.096503] RSP: 002b:00007ffcfee4d708 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 40.104198] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 40.111499] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 40.118758] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 40.126027] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000009b4a [ 40.133274] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 40.140540] [ 40.142149] Allocated by task 5768: [ 40.145759] save_stack+0x43/0xd0 [ 40.149191] kasan_kmalloc+0xc7/0xe0 [ 40.152886] __kmalloc+0x15b/0x760 [ 40.156413] __vb2_queue_alloc+0xf7/0xf20 [ 40.160543] vb2_core_reqbufs+0x971/0x1040 [ 40.164846] __vb2_init_fileio+0x344/0xc90 [ 40.169085] __vb2_perform_fileio+0xcfb/0x1210 [ 40.173648] vb2_write+0x38/0x50 [ 40.176999] vb2_fop_write+0x20a/0x400 [ 40.180878] v4l2_write+0x168/0x220 [ 40.184506] __vfs_write+0x119/0x9f0 [ 40.188204] vfs_write+0x1fc/0x560 [ 40.191722] ksys_write+0x101/0x260 [ 40.195330] __x64_sys_write+0x73/0xb0 [ 40.199203] do_syscall_64+0x1b9/0x820 [ 40.203076] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.208358] [ 40.209972] Freed by task 5768: [ 40.213233] save_stack+0x43/0xd0 [ 40.216668] __kasan_slab_free+0x102/0x150 [ 40.220884] kasan_slab_free+0xe/0x10 [ 40.224775] kfree+0xcf/0x230 [ 40.227867] __vb2_queue_free+0x5e2/0xa30 [ 40.231997] vb2_core_reqbufs+0x2da/0x1040 [ 40.236218] __vb2_cleanup_fileio+0xf0/0x160 [ 40.240608] vb2_core_queue_release+0x1e/0x80 [ 40.245083] _vb2_fop_release+0x1d2/0x2b0 [ 40.249212] vb2_fop_release+0x77/0xc0 [ 40.253082] vivid_fop_release+0x18e/0x440 [ 40.257298] v4l2_release+0xfb/0x1a0 [ 40.260993] __fput+0x385/0xa30 [ 40.264259] ____fput+0x15/0x20 [ 40.267517] task_work_run+0x1e8/0x2a0 [ 40.271384] exit_to_usermode_loop+0x318/0x380 [ 40.275948] do_syscall_64+0x6be/0x820 [ 40.279842] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.285027] [ 40.286635] The buggy address belongs to the object at ffff8801d97902c0 [ 40.286635] which belongs to the cache kmalloc-512 of size 512 [ 40.299413] The buggy address is located 0 bytes inside of [ 40.299413] 512-byte region [ffff8801d97902c0, ffff8801d97904c0) [ 40.311169] The buggy address belongs to the page: [ 40.316229] page:ffffea000765e400 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 40.324354] flags: 0x2fffc0000000200(slab) [ 40.328572] raw: 02fffc0000000200 ffffea000765f5c8 ffffea000765ea08 ffff8801da800940 [ 40.336442] raw: 0000000000000000 ffff8801d9790040 0000000100000006 0000000000000000 [ 40.344445] page dumped because: kasan: bad access detected [ 40.350260] [ 40.351904] Memory state around the buggy address: [ 40.356934] ffff8801d9790180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.364274] ffff8801d9790200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 40.371612] >ffff8801d9790280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 40.379045] ^ [ 40.384477] ffff8801d9790300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.391819] ffff8801d9790380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.399153] ================================================================== [ 40.406489] Disabling lock debugging due to kernel taint [ 40.412325] Kernel panic - not syncing: panic_on_warn set ... [ 40.412325] [ 40.417532] kobject: 'regulatory.0' (00000000f60fc2ba): kobject_uevent_env [ 40.419679] CPU: 0 PID: 5771 Comm: syz-executor431 Tainted: G B 4.19.0+ #310 [ 40.419684] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.419687] Call Trace: [ 40.419700] dump_stack+0x244/0x39d [ 40.419713] ? dump_stack_print_info.cold.1+0x20/0x20 [ 40.426823] kobject: 'regulatory.0' (00000000f60fc2ba): fill_kobj_path: path = '/devices/platform/regulatory.0' [ 40.435193] panic+0x238/0x4e7 [ 40.435203] ? add_taint.cold.5+0x16/0x16 [ 40.435217] ? preempt_schedule+0x4d/0x60 [ 40.477555] ? ___preempt_schedule+0x16/0x18 [ 40.481948] ? trace_hardirqs_on+0xb4/0x310 [ 40.486251] kasan_end_report+0x47/0x4f [ 40.490208] kasan_report.cold.8+0x76/0x309 [ 40.494516] ? vb2_mmap+0x65f/0x6e0 [ 40.498129] __asan_report_load8_noabort+0x14/0x20 [ 40.503045] vb2_mmap+0x65f/0x6e0 [ 40.506482] ? vb2_poll+0x1d0/0x1d0 [ 40.510089] vb2_fop_mmap+0x4b/0x70 [ 40.513697] v4l2_mmap+0x153/0x200 [ 40.517218] mmap_region+0xe85/0x1cd0 [ 40.521007] ? __x64_sys_brk+0x8b0/0x8b0 [ 40.525071] ? zap_class+0x640/0x640 [ 40.528769] ? mpx_unmapped_area_check+0xd8/0x108 [ 40.533637] ? arch_get_unmapped_area+0x750/0x750 [ 40.538484] ? lock_acquire+0x1ed/0x520 [ 40.542496] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 40.547505] ? cap_mmap_addr+0x52/0x130 [ 40.551462] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 40.556983] ? security_mmap_addr+0x80/0xa0 [ 40.561288] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 40.566803] ? get_unmapped_area+0x292/0x3b0 [ 40.571192] do_mmap+0xa22/0x1230 [ 40.574628] ? mmap_region+0x1cd0/0x1cd0 [ 40.578674] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 40.582731] ? down_read_killable+0x150/0x150 [ 40.587217] ? security_mmap_file+0x174/0x1b0 [ 40.591702] vm_mmap_pgoff+0x213/0x2c0 [ 40.595580] ? vma_is_stack_for_current+0xd0/0xd0 [ 40.600455] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 40.605980] ? security_file_permission+0x1c2/0x220 [ 40.610980] ksys_mmap_pgoff+0x4da/0x660 [ 40.615028] ? do_syscall_64+0x9a/0x820 [ 40.618983] ? find_mergeable_anon_vma+0xd0/0xd0 [ 40.623717] ? trace_hardirqs_on+0xbd/0x310 [ 40.628024] ? __ia32_sys_read+0xb0/0xb0 [ 40.632067] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.637409] ? trace_hardirqs_off_caller+0x310/0x310 [ 40.642493] __x64_sys_mmap+0xe9/0x1b0 [ 40.646365] do_syscall_64+0x1b9/0x820 [ 40.650233] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 40.655630] ? syscall_return_slowpath+0x5e0/0x5e0 [ 40.660617] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.665451] ? trace_hardirqs_on_caller+0x310/0x310 [ 40.670452] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 40.675450] ? prepare_exit_to_usermode+0x291/0x3b0 [ 40.680450] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.685274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 40.690443] RIP: 0033:0x444ba9 [ 40.693617] 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 [ 40.712504] RSP: 002b:00007ffcfee4d708 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 40.720190] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 40.727445] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 40.734696] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 40.741945] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000009b4a [ 40.749192] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 40.757386] Kernel Offset: disabled [ 40.761016] Rebooting in 86400 seconds..