Re: [PATCH] firmware: dmi: Respect buffer size in get_modalias

From: Cyrill Gorcunov
Date: Wed Mar 12 2025 - 15:54:24 EST


On Thu, Feb 20, 2025 at 11:53:28PM +0300, Cyrill Gorcunov wrote:
> When we collect data from DMI data the result is accumulated either
> in a page buffer from sysfs entry or from uevent environment buffer.
> Both are big enough (4K and 2K) and it is hard to imagine that we
> overflow 4K page with the data, still the situation is different for
> uevent buffer where buffer may be already filled with data and we
> possibly may overflow it.
>
> Thus lets respect buffer size given by a caller and never write
> data unconditionally.
>
> CC: Jean Delvare <jdelvare@xxxxxxxx>
> Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>

Ping?