KASAN: global-out-of-bounds Read in precalculate_color

21 views
Skip to first unread message

syzbot

unread,
Nov 28, 2019, 6:55:07 PM11/28/19
to hverkui...@xs4all.nl, linux-...@vger.kernel.org, linux...@vger.kernel.org, mch...@kernel.org, syzkall...@googlegroups.com, vivek.k...@intel.com
Hello,

syzbot found the following crash on:

HEAD commit: d7688697 Merge tag 'for-linus' of git://git.kernel.org/pub..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=125118a2e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=121b4285bac421fe
dashboard link: https://syzkaller.appspot.com/bug?extid=02d9172bf4c43104cd70
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119c517ae00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+02d917...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: global-out-of-bounds in precalculate_color+0x2154/0x2480
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:942
Read of size 1 at addr ffffffff884787bf by task vivid-000-vid-c/8948

CPU: 1 PID: 8948 Comm: vivid-000-vid-c Not tainted 5.4.0-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+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0x5/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:129
precalculate_color+0x2154/0x2480
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+0x561/0x2850 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2118
tpg_calc_text_basep+0xa1/0x290
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2136
vivid_fillbuff+0x1a5f/0x3af0
drivers/media/platform/vivid/vivid-kthread-cap.c:466
vivid_thread_vid_cap_tick+0x8cf/0x2210
drivers/media/platform/vivid/vivid-kthread-cap.c:727
vivid_thread_vid_cap+0x5d8/0xa60
drivers/media/platform/vivid/vivid-kthread-cap.c:866
kthread+0x361/0x430 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

The buggy address belongs to the variable:
sin+0x17f/0x280

Memory state around the buggy address:
ffffffff88478680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffff88478700: 00 00 00 00 00 00 00 00 01 fa fa fa fa fa fa fa
> ffffffff88478780: 00 00 06 fa fa fa fa fa 04 fa fa fa fa fa fa fa
^
ffffffff88478800: 05 fa fa fa fa fa fa fa 05 fa fa fa fa fa fa fa
ffffffff88478880: 00 00 fa fa fa fa fa fa 00 00 00 00 00 00 fa fa
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 17, 2019, 10:11:02 PM12/17/19
to da...@davemloft.net, eri...@gmail.com, hverkui...@xs4all.nl, linux-...@vger.kernel.org, linux...@vger.kernel.org, lu...@ionkov.net, mch...@kernel.org, net...@vger.kernel.org, rmin...@sandia.gov, syzkall...@googlegroups.com, v9fs-de...@lists.sourceforge.net, vi...@zeniv.linux.org.uk, vivek.k...@intel.com
syzbot has bisected this bug to:

commit 7594bf37ae9ffc434da425120c576909eb33b0bc
Author: Al Viro <vi...@zeniv.linux.org.uk>
Date: Mon Jul 17 02:53:08 2017 +0000

9p: untangle ->poll() mess

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15e323a6e00000
start commit: d7688697 Merge tag 'for-linus' of git://git.kernel.org/pub..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13e323a6e00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119c517ae00000

Reported-by: syzbot+02d917...@syzkaller.appspotmail.com
Fixes: 7594bf37ae9f ("9p: untangle ->poll() mess")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Dec 26, 2019, 1:59:09 PM12/26/19
to da...@davemloft.net, eri...@gmail.com, hverkui...@xs4all.nl, linux-...@vger.kernel.org, linux...@vger.kernel.org, lu...@ionkov.net, mch...@kernel.org, net...@vger.kernel.org, rmin...@sandia.gov, syzkall...@googlegroups.com, v9fs-de...@lists.sourceforge.net, vi...@zeniv.linux.org.uk, vivek.k...@intel.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 46cf053e Linux 5.5-rc3
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11932ce1e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=ed9d672709340e35
dashboard link: https://syzkaller.appspot.com/bug?extid=02d9172bf4c43104cd70
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14861a49e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1794423ee00000

The bug was bisected to:

commit 7594bf37ae9ffc434da425120c576909eb33b0bc
Author: Al Viro <vi...@zeniv.linux.org.uk>
Date: Mon Jul 17 02:53:08 2017 +0000

9p: untangle ->poll() mess

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15e323a6e00000
console output: https://syzkaller.appspot.com/x/log.txt?x=13e323a6e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+02d917...@syzkaller.appspotmail.com
Fixes: 7594bf37ae9f ("9p: untangle ->poll() mess")

==================================================================
BUG: KASAN: global-out-of-bounds in precalculate_color+0x2154/0x2480
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:942
Read of size 1 at addr ffffffff88b3d3f9 by task vivid-000-vid-c/9278

CPU: 0 PID: 9278 Comm: vivid-000-vid-c Not tainted 5.5.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+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0x5/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:639
__asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132
precalculate_color+0x2154/0x2480
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+0x561/0x2850 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2118
tpg_calc_text_basep+0xa1/0x290
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2136
vivid_fillbuff+0x1a5f/0x3af0
drivers/media/platform/vivid/vivid-kthread-cap.c:466
vivid_thread_vid_cap_tick+0x8cf/0x2210
drivers/media/platform/vivid/vivid-kthread-cap.c:727
vivid_thread_vid_cap+0x5d8/0xa60
drivers/media/platform/vivid/vivid-kthread-cap.c:866
kthread+0x361/0x430 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

The buggy address belongs to the variable:
kbd_keycodes+0x119/0x760

Memory state around the buggy address:
ffffffff88b3d280: fa fa fa fa 00 00 04 fa fa fa fa fa 00 00 00 00
ffffffff88b3d300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffffffff88b3d380: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
^
ffffffff88b3d400: 00 00 00 00 07 fa fa fa fa fa fa fa 00 00 00 00
ffffffff88b3d480: 00 fa fa fa fa fa fa fa 02 fa fa fa fa fa fa fa
==================================================================

syzbot

unread,
Aug 11, 2020, 9:07:06 PM8/11/20
to a.da...@linutronix.de, ak...@linux-foundation.org, bse...@google.com, chang...@intel.com, clang-bu...@googlegroups.com, da...@davemloft.net, dietmar....@arm.com, dvy...@google.com, el...@google.com, eri...@gmail.com, hverkui...@xs4all.nl, j...@git.mail.kapsi.fi, juri....@redhat.com, kasa...@googlegroups.com, kees...@chromium.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, linux-...@vger.kernel.org, luc.vano...@gmail.com, lu...@ionkov.net, mark.r...@arm.com, masa...@kernel.org, mch...@kernel.org, mgo...@suse.de, mhir...@kernel.org, micha...@markovi.net, miguel.oje...@gmail.com, mi...@redhat.com, net...@vger.kernel.org, pau...@kernel.org, pet...@infradead.org, rmin...@sandia.gov, ros...@goodmis.org, rp...@kernel.org, samito...@google.com, syzkall...@googlegroups.com, tg...@linutronix.de, v9fs-de...@lists.sourceforge.net, vincent...@linaro.org, vi...@zeniv.linux.org.uk, vivek.k...@intel.com, wi...@kernel.org, yepei...@gmail.com
syzbot suspects this issue was fixed by commit:

commit dfd402a4c4baae42398ce9180ff424d589b8bffc
Author: Marco Elver <el...@google.com>
Date: Thu Nov 14 18:02:54 2019 +0000

kcsan: Add Kernel Concurrency Sanitizer infrastructure

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13eb65d6900000
start commit: 46cf053e Linux 5.5-rc3
git tree: upstream
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=147e5ac1e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b49e71e00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: kcsan: Add Kernel Concurrency Sanitizer infrastructure
Reply all
Reply to author
Forward
0 new messages