Re: [PATCH] fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds

From: Albin Babu Varghese
Date: Wed Oct 01 2025 - 13:19:15 EST


Hi Helge, Thanks for the review.

> I wonder if the image.height value should be capped in this case,
> instead of not rendering any chars at all?
> Something like (untested!):
>
> + if (image.dy >= info->var.yres)
> + return;
> + image.height = min(image.height, info->var.yres - image.dy);

This looks like a better implementation than what I had. I thought it might be
better to skip the entire row instead of rendering partially. I’m still new to
this subsystem, so thanks for pointing this out. I’ll test the suggested
changes and send a v2.