android_kernel_motorola_sm6375/drivers/video
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tetsuo Handa 376810e5e9 fbmem: pull fbcon_update_vcs() out of fb_set_var()
[ Upstream commit d88ca7e1a27eb2df056bbf37ddef62e1c73d37ea ]

syzbot is reporting OOB read bug in vc_do_resize() [1] caused by memcpy()
based on outdated old_{rows,row_size} values, for resize_screen() can
recurse into vc_do_resize() which changes vc->vc_{cols,rows} that outdates
old_{rows,row_size} values which were saved before calling resize_screen().

Daniel Vetter explained that resize_screen() should not recurse into
fbcon_update_vcs() path due to FBINFO_MISC_USEREVENT being still set
when calling resize_screen().

Instead of masking FBINFO_MISC_USEREVENT before calling fbcon_update_vcs(),
we can remove FBINFO_MISC_USEREVENT by calling fbcon_update_vcs() only if
fb_set_var() returned 0. This change assumes that it is harmless to call
fbcon_update_vcs() when fb_set_var() returned 0 without reaching
fb_notifier_call_chain().

[1] https://syzkaller.appspot.com/bug?id=c70c88cfd16dcf6e1d3c7f0ab8648b3144b5b25e

Reported-and-tested-by: syzbot <[email protected]>
Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Reported-by: kernel test robot <[email protected]> for missing #include
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
2020-09-03 11:27:09 +02:00
..
backlight backlight: lp855x: Ensure regulators are disabled on probe failure 2020-06-24 17:50:09 +02:00
console console: newport_con: fix an issue about leak related system resources 2020-08-19 08:16:06 +02:00
fbdev fbmem: pull fbcon_update_vcs() out of fb_set_var() 2020-09-03 11:27:09 +02:00
logo
display_timing.c
hdmi.c
Kconfig
Makefile
of_display_timing.c
of_videomode.c
vgastate.c
videomode.c