kauditd_printk_skb: 3 callbacks suppressed audit: type=1400 audit(1554961152.795:35): avc: denied { map } for pid=7915 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1554961159.285:36): avc: denied { map } for pid=7927 comm="syz-executor672" path="/root/syz-executor672796578" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ================================================================== BUG: KASAN: use-after-free in v4l2_ctrl_grab drivers/media/v4l2-core/v4l2-ctrls.c:2527 [inline] BUG: KASAN: use-after-free in v4l2_ctrl_grab+0x159/0x160 drivers/media/v4l2-core/v4l2-ctrls.c:2520 Read of size 8 at addr ffff888092c315a0 by task syz-executor672/7927 CPU: 0 PID: 7927 Comm: syz-executor672 Not tainted 4.19.34 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 v4l2_ctrl_grab drivers/media/v4l2-core/v4l2-ctrls.c:2527 [inline] v4l2_ctrl_grab+0x159/0x160 drivers/media/v4l2-core/v4l2-ctrls.c:2520 vicodec_stop_streaming+0x158/0x1a0 drivers/media/platform/vicodec/vicodec-core.c:1166 __vb2_queue_cancel+0xb4/0x970 drivers/media/common/videobuf2/videobuf2-core.c:1662 vb2_core_queue_release+0x28/0x80 drivers/media/common/videobuf2/videobuf2-core.c:2051 vb2_queue_release+0x16/0x20 drivers/media/common/videobuf2/videobuf2-v4l2.c:671 v4l2_m2m_ctx_release+0x2d/0x40 drivers/media/v4l2-core/v4l2-mem2mem.c:928 vicodec_release+0xc0/0x120 drivers/media/platform/vicodec/vicodec-core.c:1304 v4l2_release+0xfb/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:448 __fput+0x2df/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x933/0x2fa0 kernel/exit.c:876 do_group_exit+0x135/0x370 kernel/exit.c:979 __do_sys_exit_group kernel/exit.c:990 [inline] __se_sys_exit_group kernel/exit.c:988 [inline] __x64_sys_exit_group+0x44/0x50 kernel/exit.c:988 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x43ee78 Code: Bad RIP value. RSP: 002b:00007ffc718a0cb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ee78 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004be748 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d0180 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7927: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x51/0x80 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x68/0x100 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] v4l2_ctrl_new.part.0+0x214/0x1460 drivers/media/v4l2-core/v4l2-ctrls.c:2175 v4l2_ctrl_new drivers/media/v4l2-core/v4l2-ctrls.c:2108 [inline] v4l2_ctrl_new_std+0x22d/0x360 drivers/media/v4l2-core/v4l2-ctrls.c:2293 vicodec_open+0x1a8/0xb30 drivers/media/platform/vicodec/vicodec-core.c:1243 v4l2_open+0x1b8/0x360 drivers/media/v4l2-core/v4l2-dev.c:427 chrdev_open+0x247/0x6b0 fs/char_dev.c:417 do_dentry_open+0x4c6/0x1200 fs/open.c:777 vfs_open+0xa0/0xd0 fs/open.c:886 do_last fs/namei.c:3418 [inline] path_openat+0x10d7/0x4690 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x550 fs/open.c:1069 __do_sys_openat fs/open.c:1096 [inline] __se_sys_openat fs/open.c:1090 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1090 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7927: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x230 mm/slab.c:3822 kvfree+0x61/0x70 mm/util.c:452 v4l2_ctrl_handler_free drivers/media/v4l2-core/v4l2-ctrls.c:1929 [inline] v4l2_ctrl_handler_free+0x4a8/0x7e0 drivers/media/v4l2-core/v4l2-ctrls.c:1909 vicodec_release+0x6b/0x120 drivers/media/platform/vicodec/vicodec-core.c:1302 v4l2_release+0xfb/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:448 __fput+0x2df/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x933/0x2fa0 kernel/exit.c:876 do_group_exit+0x135/0x370 kernel/exit.c:979 __do_sys_exit_group kernel/exit.c:990 [inline] __se_sys_exit_group kernel/exit.c:988 [inline] __x64_sys_exit_group+0x44/0x50 kernel/exit.c:988 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888092c31580 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 32 bytes inside of 256-byte region [ffff888092c31580, ffff888092c31680) The buggy address belongs to the page: page:ffffea00024b0c40 count:1 mapcount:0 mapping:ffff88812c3f07c0 index:0xffff888092c31bc0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea0002a67588 ffffea00027c3388 ffff88812c3f07c0 raw: ffff888092c31bc0 ffff888092c31080 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092c31480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888092c31500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888092c31580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888092c31600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888092c31680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================