UBSAN: shift-out-of-bounds in fbcon_set_font
Geert Uytterhoeven
geert at linux-m68k.org
Thu Jan 26 08:46:55 UTC 2023
Hi Sanan,
On Thu, Jan 26, 2023 at 12:58 AM Sanan Hasanov
<sanan.hasanov at knights.ucf.edu> wrote:
> We found a bug using a modified kernel configuration file used by syzbot.
>
> We enhanced the coverage of the configuration file using our tool, klocalizer.
>
> Kernel Branch: 6.2.0-rc5-next-20230124
> Kernel config: https://drive.google.com/file/d/1F-LszDAizEEH0ZX0HcSR06v5q8FPl2Uv/view?usp=sharing
> Reproducer: https://drive.google.com/file/d/1mP1jcLBY7vWCNM60OMf-ogw-urQRjNrm/view?usp=sharing
>
> Thank you!
>
> Best regards,
> Sanan Hasanov
>
> ================================================================================
> UBSAN: shift-out-of-bounds in drivers/video/fbdev/core/fbcon.c:2489:33
> shift exponent 35 is too large for 32-bit type 'int'
This looks valid to me: con_font_set() checks the font width and height
against max_font_width (64) and max_font_height (128), but fbcon has
stricter limits.
fbcon_set_font() should reject fonts with width > 32 or height > 32.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the dri-devel
mailing list