linux/drivers/video/fbdev/core
George Kennedy a49145acfb fbmem: add margin check to fb_check_caps()
A fb_ioctl() FBIOPUT_VSCREENINFO call with invalid xres setting
or yres setting in struct fb_var_screeninfo will result in a
KASAN: vmalloc-out-of-bounds failure in bitfill_aligned() as
the margins are being cleared. The margins are cleared in
chunks and if the xres setting or yres setting is a value of
zero upto the chunk size, the failure will occur.

Add a margin check to validate xres and yres settings.

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reported-by: syzbot+e5fd3e65515b48c02a30@syzkaller.appspotmail.com
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dhaval Giani <dhaval.giani@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1594149963-13801-1-git-send-email-george.kennedy@oracle.com
2020-09-08 13:33:01 +02:00
..
bitblit.c Linux 5.8-rc7 2020-07-27 12:40:56 +02:00
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_ccw.c Linux 5.8-rc7 2020-07-27 12:40:56 +02:00
fbcon_cw.c Linux 5.8-rc7 2020-07-27 12:40:56 +02:00
fbcon_rotate.c
fbcon_rotate.h
fbcon_ud.c Linux 5.8-rc7 2020-07-27 12:40:56 +02:00
fbcon.c TTY/Serial patches for 5.9-rc1 2020-08-06 14:56:11 -07:00
fbcon.h
fbcvt.c
fbmem.c fbmem: add margin check to fb_check_caps() 2020-09-08 13:33:01 +02:00
fbmon.c video: fbdev: Replace HTTP links with HTTPS ones 2020-07-20 11:47:29 +02:00
fbsysfs.c fbmem: pull fbcon_update_vcs() out of fb_set_var() 2020-08-04 07:37:23 +02:00
Makefile fbdev: remove object duplication in Makefile 2020-01-15 17:31:52 +01:00
modedb.c
softcursor.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tileblit.c vt: use newly defined CUR_* macros 2020-06-24 17:08:33 +02:00