[ 29.388145] audit: type=1800 audit(1541903441.403:27): pid=5898 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 29.388171] audit: type=1800 audit(1541903441.403:28): pid=5898 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 30.104983] audit: type=1800 audit(1541903442.153:29): pid=5898 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 30.125585] audit: type=1800 audit(1541903442.153:30): pid=5898 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 116.121146] sshd (6041) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.0.69' (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 [ 122.660515] ================================================================== [ 122.668005] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 122.674047] Read of size 8 at addr ffff8801bee55200 by task syz-executor700/6092 [ 122.681835] [ 122.683452] CPU: 0 PID: 6092 Comm: syz-executor700 Not tainted 4.20.0-rc1+ #108 [ 122.690979] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 122.700418] Call Trace: [ 122.702992] dump_stack+0x244/0x39d [ 122.706620] ? dump_stack_print_info.cold.1+0x20/0x20 [ 122.711860] ? printk+0xa7/0xcf [ 122.715145] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 122.719904] print_address_description.cold.7+0x9/0x1ff [ 122.725337] kasan_report.cold.8+0x242/0x309 [ 122.729738] ? vb2_mmap+0x662/0x6f0 [ 122.733362] __asan_report_load8_noabort+0x14/0x20 [ 122.738282] vb2_mmap+0x662/0x6f0 [ 122.741751] ? vb2_poll+0x1d0/0x1d0 [ 122.745371] vb2_fop_mmap+0x4b/0x70 [ 122.748986] v4l2_mmap+0x153/0x200 [ 122.752627] mmap_region+0xe85/0x1cd0 [ 122.756574] ? __x64_sys_brk+0x8b0/0x8b0 [ 122.760751] ? smack_task_getsecid+0x1e6/0x3c0 [ 122.765329] ? lock_downgrade+0x900/0x900 [ 122.769472] ? check_preemption_disabled+0x48/0x280 [ 122.774617] ? rcu_read_unlock_special+0x1c0/0x1c0 [ 122.779555] ? kasan_check_read+0x11/0x20 [ 122.783694] ? mpx_unmapped_area_check+0xd8/0x108 [ 122.788565] ? arch_get_unmapped_area+0x750/0x750 [ 122.793395] ? lock_acquire+0x1ed/0x520 [ 122.797354] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 122.802462] ? cap_mmap_addr+0x52/0x130 [ 122.806473] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 122.812006] ? security_mmap_addr+0x80/0xa0 [ 122.816321] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 122.821850] ? get_unmapped_area+0x292/0x3b0 [ 122.826313] do_mmap+0xa22/0x1230 [ 122.829762] ? mmap_region+0x1cd0/0x1cd0 [ 122.833825] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 122.837953] ? down_read_killable+0x150/0x150 [ 122.842501] ? security_mmap_file+0x174/0x1b0 [ 122.847038] vm_mmap_pgoff+0x213/0x2c0 [ 122.850935] ? vma_is_stack_for_current+0xd0/0xd0 [ 122.855763] ? smk_curacc+0x7f/0xa0 [ 122.859380] ? fget_raw+0x20/0x20 [ 122.862825] ? up_read+0x211/0x2c0 [ 122.866357] ksys_mmap_pgoff+0x4da/0x660 [ 122.870402] ? do_syscall_64+0x9a/0x820 [ 122.874369] ? find_mergeable_anon_vma+0xd0/0xd0 [ 122.879115] ? trace_hardirqs_on+0xbd/0x310 [ 122.883427] ? security_file_ioctl+0x94/0xc0 [ 122.887843] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 122.893325] ? trace_hardirqs_off_caller+0x310/0x310 [ 122.899213] __x64_sys_mmap+0xe9/0x1b0 [ 122.903135] do_syscall_64+0x1b9/0x820 [ 122.907115] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 122.912483] ? syscall_return_slowpath+0x5e0/0x5e0 [ 122.917419] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 122.922251] ? trace_hardirqs_on_caller+0x310/0x310 [ 122.927252] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 122.932260] ? prepare_exit_to_usermode+0x291/0x3b0 [ 122.937314] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 122.942215] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 122.947405] RIP: 0033:0x444c89 [ 122.950584] 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 [ 122.969472] RSP: 002b:00007ffdc43b0ec8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 122.977171] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444c89 [ 122.984429] RDX: fffffffffffffffd RSI: 0000000000002000 RDI: 0000000020ffe000 [ 122.991729] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 122.998990] R10: 0000000000000011 R11: 0000000000000216 R12: 000000000001defb [ 123.006252] R13: 0000000000401fd0 R14: 0000000000000000 R15: 0000000000000000 [ 123.013519] [ 123.015133] Allocated by task 6091: [ 123.018752] save_stack+0x43/0xd0 [ 123.022203] kasan_kmalloc+0xc7/0xe0 [ 123.025900] __kmalloc+0x15b/0x760 [ 123.029424] __vb2_queue_alloc+0xf7/0xf90 [ 123.033561] vb2_core_create_bufs+0x401/0x8c0 [ 123.038049] vb2_create_bufs+0x3c6/0x7f0 [ 123.042117] vb2_ioctl_create_bufs+0x25e/0x3d0 [ 123.046687] v4l_create_bufs+0x152/0x230 [ 123.050734] __video_do_ioctl+0x8b1/0x1050 [ 123.054952] video_usercopy+0x5c1/0x1760 [ 123.058999] video_ioctl2+0x2c/0x33 [ 123.062623] v4l2_ioctl+0x154/0x1b0 [ 123.066234] do_vfs_ioctl+0x1de/0x1790 [ 123.070106] ksys_ioctl+0xa9/0xd0 [ 123.073543] __x64_sys_ioctl+0x73/0xb0 [ 123.077426] do_syscall_64+0x1b9/0x820 [ 123.081301] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.086473] [ 123.088086] Freed by task 6091: [ 123.091352] save_stack+0x43/0xd0 [ 123.094794] __kasan_slab_free+0x102/0x150 [ 123.099013] kasan_slab_free+0xe/0x10 [ 123.102798] kfree+0xcf/0x230 [ 123.105928] __vb2_queue_free+0x5e2/0xa30 [ 123.110074] vb2_core_queue_release+0x62/0x80 [ 123.114565] _vb2_fop_release+0x1d2/0x2b0 [ 123.118696] vb2_fop_release+0x77/0xc0 [ 123.122584] vivid_fop_release+0x18e/0x440 [ 123.126828] v4l2_release+0x224/0x3a0 [ 123.130782] __fput+0x385/0xa30 [ 123.134165] ____fput+0x15/0x20 [ 123.137437] task_work_run+0x1e8/0x2a0 [ 123.141370] do_exit+0x1ad6/0x26d0 [ 123.144902] do_group_exit+0x177/0x440 [ 123.148782] __x64_sys_exit_group+0x3e/0x50 [ 123.153121] do_syscall_64+0x1b9/0x820 [ 123.156991] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.162162] [ 123.163773] The buggy address belongs to the object at ffff8801bee55200 [ 123.163773] which belongs to the cache kmalloc-1k of size 1024 [ 123.176416] The buggy address is located 0 bytes inside of [ 123.176416] 1024-byte region [ffff8801bee55200, ffff8801bee55600) [ 123.188190] The buggy address belongs to the page: [ 123.193108] page:ffffea0006fb9500 count:1 mapcount:0 mapping:ffff8801da800ac0 index:0x0 compound_mapcount: 0 [ 123.203075] flags: 0x2fffc0000010200(slab|head) [ 123.207731] raw: 02fffc0000010200 ffffea0006fcff08 ffffea0006fb7708 ffff8801da800ac0 [ 123.215595] raw: 0000000000000000 ffff8801bee54000 0000000100000007 0000000000000000 [ 123.223452] page dumped because: kasan: bad access detected [ 123.229140] [ 123.230746] Memory state around the buggy address: [ 123.235698] ffff8801bee55100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 123.243048] ffff8801bee55180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 123.250399] >ffff8801bee55200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 123.257797] ^ executing program [ 123.261151] ffff8801bee55280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 123.268500] ffff8801bee55300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 123.275884] ================================================================== [ 123.283332] Disabling lock debugging due to kernel taint [ 123.289859] Kernel panic - not syncing: panic_on_warn set ... [ 123.295804] CPU: 0 PID: 6092 Comm: syz-executor700 Tainted: G B 4.20.0-rc1+ #108 [ 123.304626] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 123.313964] Call Trace: [ 123.316540] dump_stack+0x244/0x39d [ 123.320197] ? dump_stack_print_info.cold.1+0x20/0x20 [ 123.325432] panic+0x2ad/0x55c [ 123.328616] ? add_taint.cold.5+0x16/0x16 [ 123.332754] ? preempt_schedule+0x4d/0x60 [ 123.336890] ? ___preempt_schedule+0x16/0x18 [ 123.341348] ? trace_hardirqs_on+0xb4/0x310 [ 123.345660] kasan_end_report+0x47/0x4f [ 123.349628] kasan_report.cold.8+0x76/0x309 [ 123.353931] ? vb2_mmap+0x662/0x6f0 [ 123.357603] __asan_report_load8_noabort+0x14/0x20 [ 123.362551] vb2_mmap+0x662/0x6f0 [ 123.366148] ? vb2_poll+0x1d0/0x1d0 [ 123.369801] vb2_fop_mmap+0x4b/0x70 [ 123.373414] v4l2_mmap+0x153/0x200 [ 123.377048] mmap_region+0xe85/0x1cd0 [ 123.380848] ? __x64_sys_brk+0x8b0/0x8b0 [ 123.385048] ? smack_task_getsecid+0x1e6/0x3c0 [ 123.389651] ? lock_downgrade+0x900/0x900 [ 123.393810] ? check_preemption_disabled+0x48/0x280 [ 123.398821] ? rcu_read_unlock_special+0x1c0/0x1c0 [ 123.403767] ? kasan_check_read+0x11/0x20 [ 123.407905] ? mpx_unmapped_area_check+0xd8/0x108 [ 123.412742] ? arch_get_unmapped_area+0x750/0x750 [ 123.417575] ? lock_acquire+0x1ed/0x520 [ 123.421534] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 123.426533] ? cap_mmap_addr+0x52/0x130 [ 123.430625] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 123.436151] ? security_mmap_addr+0x80/0xa0 [ 123.440501] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 123.446094] ? get_unmapped_area+0x292/0x3b0 [ 123.450678] do_mmap+0xa22/0x1230 [ 123.454131] ? mmap_region+0x1cd0/0x1cd0 [ 123.458177] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 123.462223] ? down_read_killable+0x150/0x150 [ 123.466700] ? security_mmap_file+0x174/0x1b0 [ 123.471183] vm_mmap_pgoff+0x213/0x2c0 [ 123.475059] ? vma_is_stack_for_current+0xd0/0xd0 [ 123.479909] ? smk_curacc+0x7f/0xa0 [ 123.483526] ? fget_raw+0x20/0x20 [ 123.486968] ? up_read+0x211/0x2c0 [ 123.490515] ksys_mmap_pgoff+0x4da/0x660 [ 123.494561] ? do_syscall_64+0x9a/0x820 [ 123.498551] ? find_mergeable_anon_vma+0xd0/0xd0 [ 123.503395] ? trace_hardirqs_on+0xbd/0x310 [ 123.507700] ? security_file_ioctl+0x94/0xc0 [ 123.512096] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.517439] ? trace_hardirqs_off_caller+0x310/0x310 [ 123.522531] __x64_sys_mmap+0xe9/0x1b0 [ 123.526424] do_syscall_64+0x1b9/0x820 [ 123.530300] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 123.535652] ? syscall_return_slowpath+0x5e0/0x5e0 [ 123.540584] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 123.545419] ? trace_hardirqs_on_caller+0x310/0x310 [ 123.550496] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 123.555529] ? prepare_exit_to_usermode+0x291/0x3b0 [ 123.560528] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 123.565358] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.570533] RIP: 0033:0x444c89 [ 123.573715] 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 [ 123.592601] RSP: 002b:00007ffdc43b0ec8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 123.600290] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444c89 [ 123.607546] RDX: fffffffffffffffd RSI: 0000000000002000 RDI: 0000000020ffe000 [ 123.614801] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 123.622052] R10: 0000000000000011 R11: 0000000000000216 R12: 000000000001defb [ 123.629308] R13: 0000000000401fd0 R14: 0000000000000000 R15: 0000000000000000 [ 123.637548] Kernel Offset: disabled [ 123.641175] Rebooting in 86400 seconds..