[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ab00319-e43e-4000-8814-c7d67f384c53@gmx.de>
Date: Wed, 1 Oct 2025 20:36:47 +0200
From: Helge Deller <deller@....de>
To: Albin Babu Varghese <albinbabuvarghese20@...il.com>
Cc: Simona Vetter <simona@...ll.ch>,
syzbot+48b0652a95834717f190@...kaller.appspotmail.com,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fbdev: Add bounds checking in bit_putcs to fix
vmalloc-out-of-bounds
On 10/1/25 19:19, Albin Babu Varghese wrote:
> 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 just added comments - not sure if mine was better.,
> I thought it might be better to skip the entire row instead of
> rendering partially.
Do you know if this affects the selection?
If so, would modifying (reducing/shortening) the selection maybe fix it?
> I’m still new to this subsystem, so thanks for pointing this out.
> I’ll test the suggested changes and send a v2.
Thanks for testing and checking!
Helge
Powered by blists - more mailing lists