================================================================== BUG: KASAN: global-out-of-bounds in precalculate_color+0x212e/0x23c0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:942 Read of size 1 at addr ffffffff88dafbea by task vivid-000-vid-c/11609 CPU: 1 PID: 11609 Comm: vivid-000-vid-c Not tainted 5.8.0-rc3-syzkaller #0 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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0x5/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 precalculate_color+0x212e/0x23c0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:942 tpg_precalculate_colors drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1093 [inline] tpg_recalc+0x5c8/0x2590 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2118 tpg_calc_text_basep+0xb4/0x260 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2136 vivid_fillbuff+0x17dc/0x39d0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:466 vivid_thread_vid_cap_tick+0x88b/0x2330 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:727 vivid_thread_vid_cap+0x5d1/0xa50 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:866 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the variable: sin+0x22a/0x280 Memory state around the buggy address: ffffffff88dafa80: 00 00 00 00 00 00 00 00 01 fa fa fa fa fa fa fa ffffffff88dafb00: 00 00 06 fa fa fa fa fa 04 fa fa fa fa fa fa fa >ffffffff88dafb80: 05 fa fa fa fa fa fa fa 05 fa fa fa fa fa fa fa ^ ffffffff88dafc00: 00 00 fa fa fa fa fa fa 00 00 00 00 00 00 fa fa ffffffff88dafc80: fa fa fa fa 00 05 fa fa fa fa fa fa 00 06 fa fa ==================================================================