[ 28.472881] audit: type=1800 audit(1540925246.077:27): pid=5593 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 28.491779] audit: type=1800 audit(1540925246.077:28): pid=5593 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. [ 29.368478] audit: type=1800 audit(1540925247.047:29): pid=5593 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 29.387092] audit: type=1800 audit(1540925247.057:30): pid=5593 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: [ 35.346334] sshd (5733) used greatest stack depth: 15744 bytes left Warning: Permanently added '10.128.10.3' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program [ 42.091364] ================================================================== [ 42.098984] BUG: KASAN: use-after-free in vb2_mmap+0x65f/0x6e0 [ 42.105095] Read of size 8 at addr ffff8801cd84c840 by task syz-executor307/5757 [ 42.112734] [ 42.114357] CPU: 1 PID: 5757 Comm: syz-executor307 Not tainted 4.19.0+ #88 [ 42.121358] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.130815] Call Trace: [ 42.133411] dump_stack+0x244/0x39d [ 42.137054] ? dump_stack_print_info.cold.1+0x20/0x20 [ 42.142252] ? printk+0xa7/0xcf [ 42.145534] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 42.150288] print_address_description.cold.7+0x9/0x1ff [ 42.155655] kasan_report.cold.8+0x242/0x309 [ 42.160062] ? vb2_mmap+0x65f/0x6e0 [ 42.163787] __asan_report_load8_noabort+0x14/0x20 [ 42.168747] vb2_mmap+0x65f/0x6e0 [ 42.172223] ? vb2_poll+0x1d0/0x1d0 [ 42.175846] vb2_fop_mmap+0x4b/0x70 [ 42.179477] v4l2_mmap+0x153/0x200 [ 42.183025] mmap_region+0xe85/0x1cd0 [ 42.186825] ? __x64_sys_brk+0x8b0/0x8b0 [ 42.190892] ? zap_class+0x640/0x640 [ 42.194631] ? mpx_unmapped_area_check+0xd8/0x108 [ 42.199472] ? arch_get_unmapped_area+0x750/0x750 [ 42.204316] ? lock_acquire+0x1ed/0x520 [ 42.208374] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 42.213420] ? cap_mmap_addr+0x52/0x130 [ 42.217391] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 42.222990] ? security_mmap_addr+0x80/0xa0 [ 42.227334] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 42.232877] ? get_unmapped_area+0x292/0x3b0 [ 42.237300] do_mmap+0xa22/0x1230 [ 42.240747] ? mmap_region+0x1cd0/0x1cd0 [ 42.244798] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 42.248850] ? down_read_killable+0x150/0x150 [ 42.253346] ? security_mmap_file+0x174/0x1b0 [ 42.257835] vm_mmap_pgoff+0x213/0x2c0 [ 42.261725] ? vma_is_stack_for_current+0xd0/0xd0 [ 42.266560] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 42.272198] ? security_file_permission+0x1c2/0x220 [ 42.277223] ksys_mmap_pgoff+0x4da/0x660 [ 42.281280] ? do_syscall_64+0x9a/0x820 [ 42.285241] ? find_mergeable_anon_vma+0xd0/0xd0 [ 42.290036] ? trace_hardirqs_on+0xbd/0x310 [ 42.294371] ? __ia32_sys_read+0xb0/0xb0 [ 42.298452] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.303820] ? trace_hardirqs_off_caller+0x310/0x310 [ 42.308936] __x64_sys_mmap+0xe9/0x1b0 [ 42.312865] do_syscall_64+0x1b9/0x820 [ 42.316765] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 42.322116] ? syscall_return_slowpath+0x5e0/0x5e0 [ 42.327031] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.331865] ? trace_hardirqs_on_caller+0x310/0x310 [ 42.336881] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 42.341906] ? prepare_exit_to_usermode+0x291/0x3b0 [ 42.346919] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.352022] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.357206] RIP: 0033:0x444ba9 [ 42.360388] 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 [ 42.379397] RSP: 002b:00007ffe2892c7c8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 42.387125] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 42.394448] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 42.401710] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 42.409093] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000401e60 [ 42.416351] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 42.423628] [ 42.425241] Allocated by task 5759: [ 42.429077] save_stack+0x43/0xd0 [ 42.432523] kasan_kmalloc+0xc7/0xe0 [ 42.436229] __kmalloc+0x15b/0x760 [ 42.439759] __vb2_queue_alloc+0xf7/0xf20 [ 42.443890] vb2_core_reqbufs+0x971/0x1040 [ 42.448138] __vb2_init_fileio+0x344/0xc90 [ 42.452356] __vb2_perform_fileio+0xcfb/0x1210 [ 42.456922] vb2_write+0x38/0x50 [ 42.460270] vb2_fop_write+0x20a/0x400 [ 42.464197] v4l2_write+0x168/0x220 [ 42.467817] __vfs_write+0x119/0x9f0 [ 42.471514] vfs_write+0x1fc/0x560 [ 42.475174] ksys_write+0x101/0x260 [ 42.478791] __x64_sys_write+0x73/0xb0 [ 42.482800] do_syscall_64+0x1b9/0x820 [ 42.486693] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.491859] [ 42.493468] Freed by task 5759: [ 42.496731] save_stack+0x43/0xd0 [ 42.500171] __kasan_slab_free+0x102/0x150 [ 42.504399] kasan_slab_free+0xe/0x10 [ 42.508201] kfree+0xcf/0x230 [ 42.511288] __vb2_queue_free+0x5e2/0xa30 [ 42.515431] vb2_core_reqbufs+0x2da/0x1040 [ 42.519660] __vb2_cleanup_fileio+0xf0/0x160 [ 42.524050] vb2_core_queue_release+0x1e/0x80 [ 42.528550] _vb2_fop_release+0x1d2/0x2b0 [ 42.532684] vb2_fop_release+0x77/0xc0 [ 42.536560] vivid_fop_release+0x18e/0x440 [ 42.540780] v4l2_release+0xfb/0x1a0 [ 42.544517] __fput+0x385/0xa30 [ 42.547799] ____fput+0x15/0x20 [ 42.551084] task_work_run+0x1e8/0x2a0 [ 42.554961] exit_to_usermode_loop+0x318/0x380 [ 42.559578] do_syscall_64+0x6be/0x820 [ 42.563560] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.568743] [ 42.570353] The buggy address belongs to the object at ffff8801cd84c840 [ 42.570353] which belongs to the cache kmalloc-512 of size 512 [ 42.583096] The buggy address is located 0 bytes inside of [ 42.583096] 512-byte region [ffff8801cd84c840, ffff8801cd84ca40) [ 42.594784] The buggy address belongs to the page: [ 42.599699] page:ffffea0007361300 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 [ 42.608018] flags: 0x2fffc0000000200(slab) [ 42.612245] raw: 02fffc0000000200 ffffea0007369a08 ffffea000736e808 ffff8801da800940 [ 42.620107] raw: 0000000000000000 ffff8801cd84c0c0 0000000100000006 0000000000000000 [ 42.627971] page dumped because: kasan: bad access detected [ 42.633663] [ 42.635277] Memory state around the buggy address: [ 42.640193] ffff8801cd84c700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.647543] ffff8801cd84c780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 42.654888] >ffff8801cd84c800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 42.662249] ^ [ 42.667683] ffff8801cd84c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.675027] ffff8801cd84c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.682373] ================================================================== [ 42.689714] Disabling lock debugging due to kernel taint [ 42.695692] Kernel panic - not syncing: panic_on_warn set ... [ 42.695692] [ 42.703052] CPU: 1 PID: 5757 Comm: syz-executor307 Tainted: G B 4.19.0+ #88 [ 42.711481] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.721002] Call Trace: [ 42.723600] dump_stack+0x244/0x39d [ 42.727223] ? dump_stack_print_info.cold.1+0x20/0x20 [ 42.732419] panic+0x238/0x4e7 [ 42.735599] ? add_taint.cold.5+0x16/0x16 [ 42.739744] ? preempt_schedule+0x4d/0x60 [ 42.744038] ? ___preempt_schedule+0x16/0x18 [ 42.748445] ? trace_hardirqs_on+0xb4/0x310 [ 42.752761] kasan_end_report+0x47/0x4f [ 42.756727] kasan_report.cold.8+0x76/0x309 [ 42.761121] ? vb2_mmap+0x65f/0x6e0 [ 42.764762] __asan_report_load8_noabort+0x14/0x20 [ 42.769750] vb2_mmap+0x65f/0x6e0 [ 42.773195] ? vb2_poll+0x1d0/0x1d0 [ 42.776816] vb2_fop_mmap+0x4b/0x70 [ 42.780442] v4l2_mmap+0x153/0x200 [ 42.783971] mmap_region+0xe85/0x1cd0 [ 42.787786] ? __x64_sys_brk+0x8b0/0x8b0 [ 42.791844] ? zap_class+0x640/0x640 [ 42.795572] ? mpx_unmapped_area_check+0xd8/0x108 [ 42.800402] ? arch_get_unmapped_area+0x750/0x750 [ 42.805300] ? lock_acquire+0x1ed/0x520 [ 42.809272] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 42.814367] ? cap_mmap_addr+0x52/0x130 [ 42.818328] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 42.823848] ? security_mmap_addr+0x80/0xa0 [ 42.828153] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 42.833698] ? get_unmapped_area+0x292/0x3b0 [ 42.838114] do_mmap+0xa22/0x1230 [ 42.841556] ? mmap_region+0x1cd0/0x1cd0 [ 42.845611] ? vm_mmap_pgoff+0x1b5/0x2c0 [ 42.849662] ? down_read_killable+0x150/0x150 [ 42.854142] ? security_mmap_file+0x174/0x1b0 [ 42.858628] vm_mmap_pgoff+0x213/0x2c0 [ 42.862502] ? vma_is_stack_for_current+0xd0/0xd0 [ 42.867332] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 42.872876] ? security_file_permission+0x1c2/0x220 [ 42.877887] ksys_mmap_pgoff+0x4da/0x660 [ 42.882031] ? do_syscall_64+0x9a/0x820 [ 42.886026] ? find_mergeable_anon_vma+0xd0/0xd0 [ 42.890771] ? trace_hardirqs_on+0xbd/0x310 [ 42.895091] ? __ia32_sys_read+0xb0/0xb0 [ 42.899141] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.904503] ? trace_hardirqs_off_caller+0x310/0x310 [ 42.909604] __x64_sys_mmap+0xe9/0x1b0 [ 42.913484] do_syscall_64+0x1b9/0x820 [ 42.917360] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 42.922707] ? syscall_return_slowpath+0x5e0/0x5e0 [ 42.927623] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.932462] ? trace_hardirqs_on_caller+0x310/0x310 [ 42.937466] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 42.942485] ? prepare_exit_to_usermode+0x291/0x3b0 [ 42.947496] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.952329] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.957690] RIP: 0033:0x444ba9 [ 42.960934] 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 [ 42.979949] RSP: 002b:00007ffe2892c7c8 EFLAGS: 00000216 ORIG_RAX: 0000000000000009 [ 42.987712] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444ba9 [ 42.994967] RDX: 0000000002000002 RSI: 0000000000001000 RDI: 0000000020fff000 [ 43.002219] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 [ 43.009533] R10: 0000000000000013 R11: 0000000000000216 R12: 0000000000401e60 [ 43.016793] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 43.024932] Kernel Offset: disabled [ 43.028555] Rebooting in 86400 seconds..