linux-yocto/drivers/video
Thomas Zimmermann 09e3bda3a7 fbcon: Fix OOB access in font allocation
commit 9b2f5ef00e852f8e8902a4d4f73aeedc60220c12 upstream.

Commit 1a194e6c8e1e ("fbcon: fix integer overflow in fbcon_do_set_font")
introduced an out-of-bounds access by storing data and allocation sizes
in the same variable. Restore the old size calculation and use the new
variable 'alloc_size' for the allocation.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 1a194e6c8e1e ("fbcon: fix integer overflow in fbcon_do_set_font")
Reported-by: Jani Nikula <jani.nikula@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15020
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6201
Cc: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: George Kennedy <george.kennedy@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Qianqiang Liu <qianqiang.liu@163.com>
Cc: Shixiong Ou <oushixiong@kylinos.cn>
Cc: Kees Cook <kees@kernel.org>
Cc: <stable@vger.kernel.org> # v5.9+
Cc: Zsolt Kajtar <soci@c64.rulez.org>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Qianqiang Liu <qianqiang.liu@163.com>
Link: https://lore.kernel.org/r/20250922134619.257684-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-02 13:42:54 +02:00
..
backlight backlight: pm8941: Add NULL check in wled_configure() 2025-06-19 15:28:26 +02:00
console Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()" 2025-08-28 16:28:33 +02:00
fbdev fbcon: Fix OOB access in font allocation 2025-10-02 13:42:54 +02:00
logo
aperture.c
cmdline.c
display_timing.c
hdmi.c
Kconfig video: Add helpers for decoding screen_info 2024-08-11 12:47:15 +02:00
Makefile video: Provide screen_info_get_pci_dev() to find screen_info's PCI device 2024-08-11 12:47:15 +02:00
nomodeset.c
of_display_timing.c
of_videomode.c
screen_info_generic.c video: Add helpers for decoding screen_info 2024-08-11 12:47:15 +02:00
screen_info_pci.c video: screen_info: Relocate framebuffers behind PCI bridges 2025-06-27 11:08:50 +01:00
sticore.c
vgastate.c
videomode.c