Re: [PATCH v2 (repost)] fbmem: don't allow too huge resolutions

2021-09-08 Thread Daniel Vetter
On Wed, Sep 08, 2021 at 07:27:49PM +0900, Tetsuo Handa wrote: > 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

[PATCH v2 (repost)] fbmem: don't allow too huge resolutions

2021-09-08 Thread Tetsuo Handa
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 multi