Warning: Permanently added '10.128.0.45' (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 syzkaller login: [ 61.857734] ================================================================== [ 61.865380] BUG: KASAN: use-after-free in vb2_mmap+0x662/0x6f0 [ 61.871340] Read of size 8 at addr ffff8801bc428000 by task syz-executor978/5730 [ 61.878867] [ 61.880487] CPU: 0 PID: 5730 Comm: syz-executor978 Not tainted 4.20.0-rc1-next-20181105+ #105 [ 61.889143] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 61.898500] Call Trace: [ 61.901081] dump_stack+0x244/0x39d [ 61.904697] ? dump_stack_print_info.cold.1+0x20/0x20 [ 61.909889] ? printk+0xa7/0xcf [ 61.913159] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 61.917906] print_address_description.cold.7+0x9/0x1ff [ 61.923268] kasan_report.cold.8+0x242/0x309 [ 61.927780] ? vb2_mmap+0x662/0x6f0 [ 61.931397] __asan_report_load8_noabort+0x14/0x20 [ 61.936314] vb2_mmap+0x662/0x6f0 [ 61.939755] ? vb2_poll+0x1d0/0x1d0 [ 61.943370] vb2_fop_mmap+0x4b/0x70 [ 61.946991] v4l2_mmap+0x153/0x200 [ 61.950521] mmap_region+0xe85/0x1cd0 [ 61.954430] ? __x64_sys_brk+0x8b0/0x8b0 [ 61.958483] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 61.963755] ? rcu_softirq_qs+0x20/0x20 [ 61.967728] ? mpx_unmapped_area_check+0xd8/0x108 [ 61.972560] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 61.978009] ? arch_get_unmapped_area+0x750/0x750 [ 61.982841] ? lock_acquire+0x1ed/0x520 [ 61.986800] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 61.991805] ? cap_mmap_addr+0x52/0x130 [ 61.995768] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 62.001291] ? security_mmap_addr+0x80/0xa0 [ 62.005601] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 62.011134] ? get_unmapped_area+0x292/0x3b0 [ 62.015541] do_mmap+0xa22/0x1230 [ 62.019005] ? mmap_region+0x1cd0/0x1cd0 [ 62.023061] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 62.027149] ? down_read_killable+0x150/0x150 [ 62.031643] ? security_mmap_file+0x174/0x1b0 [ 62.036256] vm_mmap_pgoff+0x213/0x2c0 [ 62.040390] ? vma_is_stack_for_current+0xd0/0xd0 [ 62.045216] ? putname+0xf2/0x130 [ 62.048790] ? rcu_read_lock_sched_held+0x14f/0x180 [ 62.053804] ksys_mmap_pgoff+0x4da/0x660 [ 62.057858] ? do_syscall_64+0x9a/0x820 [ 62.061830] ? find_mergeable_anon_vma+0xd0/0xd0 [ 62.066701] ? trace_hardirqs_on+0xbd/0x310 [ 62.071011] ? filp_open+0x80/0x80 [ 62.074549] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.079906] ? trace_hardirqs_off_caller+0x300/0x300 [ 62.085001] __x64_sys_mmap+0xe9/0x1b0 [ 62.088878] do_syscall_64+0x1b9/0x820 [ 62.092798] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 62.098155] ? syscall_return_slowpath+0x5e0/0x5e0 [ 62.103072] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.107909] ? trace_hardirqs_on_caller+0x310/0x310 [ 62.112915] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 62.117923] ? prepare_exit_to_usermode+0x291/0x3b0 [ 62.122930] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.127761] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.132938] RIP: 0033:0x444bf9 [ 62.136121] 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 [ 62.155050] RSP: 002b:00007ffcf8701678 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 62.162754] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444bf9 [ 62.170011] RDX: 000000000000000d RSI: 0000000000002000 RDI: 0000000020ffe000 [ 62.177266] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000000 [ 62.184525] R10: 0000000000080851 R11: 0000000000000216 R12: 000000000000f118 [ 62.191785] R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000 [ 62.199053] [ 62.200670] Allocated by task 5729: [ 62.204287] save_stack+0x43/0xd0 [ 62.207900] kasan_kmalloc+0xc7/0xe0 [ 62.211601] __kmalloc+0x15b/0x760 [ 62.215134] __vb2_queue_alloc+0xf7/0xf90 [ 62.219281] vb2_core_reqbufs+0x971/0x1040 [ 62.223524] vb2_ioctl_reqbufs+0x1f5/0x3a0 [ 62.227769] v4l_reqbufs+0xae/0xd0 [ 62.231311] __video_do_ioctl+0x8b1/0x1050 [ 62.235537] video_usercopy+0x5c1/0x1750 [ 62.239712] video_ioctl2+0x2c/0x33 [ 62.243339] v4l2_ioctl+0x154/0x1b0 [ 62.246971] do_vfs_ioctl+0x1de/0x1790 [ 62.250846] ksys_ioctl+0xa9/0xd0 [ 62.254292] __x64_sys_ioctl+0x73/0xb0 [ 62.258173] do_syscall_64+0x1b9/0x820 [ 62.262064] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.267243] [ 62.268861] Freed by task 5729: [ 62.272133] save_stack+0x43/0xd0 [ 62.275573] __kasan_slab_free+0x102/0x150 [ 62.279794] kasan_slab_free+0xe/0x10 [ 62.283641] kfree+0xcf/0x230 [ 62.286740] __vb2_queue_free+0x5e2/0xa30 [ 62.290874] vb2_core_queue_release+0x62/0x80 [ 62.295420] _vb2_fop_release+0x1d2/0x2b0 [ 62.299562] vb2_fop_release+0x77/0xc0 [ 62.303436] v4l2_release+0x2f2/0x3a0 [ 62.307228] __fput+0x3bc/0xa70 [ 62.310494] ____fput+0x15/0x20 [ 62.313759] task_work_run+0x1e8/0x2a0 [ 62.317633] exit_to_usermode_loop+0x318/0x380 [ 62.322205] do_syscall_64+0x6be/0x820 [ 62.326080] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.331247] [ 62.332859] The buggy address belongs to the object at ffff8801bc428000 [ 62.332859] which belongs to the cache kmalloc-1k of size 1024 [ 62.345505] The buggy address is located 0 bytes inside of [ 62.345505] 1024-byte region [ffff8801bc428000, ffff8801bc428400) [ 62.357277] The buggy address belongs to the page: [ 62.362289] page:ffffea0006f10a00 count:1 mapcount:0 mapping:ffff8801da800ac0 index:0x0 compound_mapcount: 0 [ 62.372241] flags: 0x2fffc0000010200(slab|head) [ 62.376944] raw: 02fffc0000010200 ffffea00073c8e88 ffffea0007183c08 ffff8801da800ac0 [ 62.384824] raw: 0000000000000000 ffff8801bc428000 0000000100000007 0000000000000000 [ 62.392691] page dumped because: kasan: bad access detected [ 62.398380] [ 62.399988] Memory state around the buggy address: [ 62.404907] ffff8801bc427f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 62.412263] ffff8801bc427f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 62.419608] >ffff8801bc428000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.426948] ^ [ 62.430304] ffff8801bc428080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.437649] ffff8801bc428100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.444987] ================================================================== [ 62.452324] Disabling lock debugging due to kernel taint [ 62.458450] Kernel panic - not syncing: panic_on_warn set ... [ 62.464334] CPU: 0 PID: 5730 Comm: syz-executor978 Tainted: G B 4.20.0-rc1-next-20181105+ #105 [ 62.474381] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 62.483768] Call Trace: [ 62.486351] dump_stack+0x244/0x39d [ 62.489978] ? dump_stack_print_info.cold.1+0x20/0x20 [ 62.495165] panic+0x2ad/0x55c [ 62.498348] ? add_taint.cold.5+0x16/0x16 [ 62.502493] ? preempt_schedule+0x4d/0x60 [ 62.506630] ? ___preempt_schedule+0x16/0x18 [ 62.511036] ? trace_hardirqs_on+0xb4/0x310 [ 62.515364] kasan_end_report+0x47/0x4f [ 62.519331] kasan_report.cold.8+0x76/0x309 [ 62.523648] ? vb2_mmap+0x662/0x6f0 [ 62.527265] __asan_report_load8_noabort+0x14/0x20 [ 62.532180] vb2_mmap+0x662/0x6f0 [ 62.535625] ? vb2_poll+0x1d0/0x1d0 [ 62.539237] vb2_fop_mmap+0x4b/0x70 [ 62.542848] v4l2_mmap+0x153/0x200 [ 62.546377] mmap_region+0xe85/0x1cd0 [ 62.550165] ? __x64_sys_brk+0x8b0/0x8b0 [ 62.554337] ? rcu_dynticks_curr_cpu_in_eqs+0xa2/0x170 [ 62.559610] ? rcu_softirq_qs+0x20/0x20 [ 62.563674] ? mpx_unmapped_area_check+0xd8/0x108 [ 62.568510] ? refcount_inc_not_zero_checked+0x2f0/0x2f0 [ 62.574068] ? arch_get_unmapped_area+0x750/0x750 [ 62.578920] ? lock_acquire+0x1ed/0x520 [ 62.582895] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 62.587949] ? cap_mmap_addr+0x52/0x130 [ 62.591960] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 62.597491] ? security_mmap_addr+0x80/0xa0 [ 62.601803] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 62.607328] ? get_unmapped_area+0x292/0x3b0 [ 62.611729] do_mmap+0xa22/0x1230 [ 62.615216] ? mmap_region+0x1cd0/0x1cd0 [ 62.619312] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 62.623373] ? down_read_killable+0x150/0x150 [ 62.627926] ? security_mmap_file+0x174/0x1b0 [ 62.632416] vm_mmap_pgoff+0x213/0x2c0 [ 62.636300] ? vma_is_stack_for_current+0xd0/0xd0 [ 62.641185] ? putname+0xf2/0x130 [ 62.644630] ? rcu_read_lock_sched_held+0x14f/0x180 [ 62.649641] ksys_mmap_pgoff+0x4da/0x660 [ 62.653695] ? do_syscall_64+0x9a/0x820 [ 62.657659] ? find_mergeable_anon_vma+0xd0/0xd0 [ 62.662461] ? trace_hardirqs_on+0xbd/0x310 [ 62.666775] ? filp_open+0x80/0x80 [ 62.670343] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.675708] ? trace_hardirqs_off_caller+0x300/0x300 [ 62.680798] __x64_sys_mmap+0xe9/0x1b0 [ 62.684677] do_syscall_64+0x1b9/0x820 [ 62.688565] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 62.693916] ? syscall_return_slowpath+0x5e0/0x5e0 [ 62.698829] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.703706] ? trace_hardirqs_on_caller+0x310/0x310 [ 62.708757] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 62.713764] ? prepare_exit_to_usermode+0x291/0x3b0 [ 62.718767] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 62.723646] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.728824] RIP: 0033:0x444bf9 [ 62.732009] 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 [ 62.750906] RSP: 002b:00007ffcf8701678 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 62.758600] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444bf9 [ 62.765856] RDX: 000000000000000d RSI: 0000000000002000 RDI: 0000000020ffe000 [ 62.773111] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000000 [ 62.780372] R10: 0000000000080851 R11: 0000000000000216 R12: 000000000000f118 [ 62.787628] R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000 [ 62.795814] Kernel Offset: disabled [ 62.799438] Rebooting in 86400 seconds..