[PATCH v3] boot: pxe_utils: Fix incorrect allocation of overlay_dir

Quentin Schulz quentin.schulz at cherry.de
Fri Nov 21 11:04:16 CET 2025


Hi Surkov,

On 11/20/25 8:18 PM, Surkov Kirill wrote:
> [You don't often get email from fanra3.tk at gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> The function label_boot_extension() calls snprintf on a buffer
> overlay_dir. However, this buffer is not initialized properly. In the
> "if" branch it is initialized using a variable "len", which is smaller
> than the resulting buffer. In the "else" branch this variable is not
> initialized at all. This results in a crash when calling a "sysboot"
> command.
> 
> This commit fixes this issue.
> 

I believe we already have a patch submitted for this issue:

https://lore.kernel.org/u-boot/20251117152308.900316-1-kory.maincent@bootlin.com/T/#u

so please give that a try and a tested-by/reviewed-by there.

Cheers,
Quentin


More information about the U-Boot mailing list