mirror of https://github.com/torvalds/linux.git
syzbot is reporting page fault at vga16fb_fillrect() [1], for
vga16fb_check_var() is failing to detect multiplication overflow.
if (vxres * vyres > maxmem) {
vyres = maxmem / vxres;
if (vyres < yres)
return -ENOMEM;
}
Since no module would accept too huge resolutions where multiplication
overflow happens, let's reject in the common path.
Link: https://syzkaller.appspot.com/bug?extid=04168c8063cfdde1db5e [1]
Reported-by: syzbot <syzbot+04168c8063cfdde1db5e@syzkaller.appspotmail.com>
Debugged-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/185175d6-227a-7b55-433d-b070929b262c@i-love.sakura.ne.jp
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| bitblit.c | ||
| cfbcopyarea.c | ||
| cfbfillrect.c | ||
| cfbimgblt.c | ||
| fb_cmdline.c | ||
| fb_ddc.c | ||
| fb_defio.c | ||
| fb_draw.h | ||
| fb_notify.c | ||
| fb_sys_fops.c | ||
| fbcmap.c | ||
| fbcon.c | ||
| fbcon.h | ||
| fbcon_ccw.c | ||
| fbcon_cw.c | ||
| fbcon_rotate.c | ||
| fbcon_rotate.h | ||
| fbcon_ud.c | ||
| fbcvt.c | ||
| fbmem.c | ||
| fbmon.c | ||
| fbsysfs.c | ||
| modedb.c | ||
| softcursor.c | ||
| svgalib.c | ||
| syscopyarea.c | ||
| sysfillrect.c | ||
| sysimgblt.c | ||
| tileblit.c | ||