Skip to contentSkip to conversation

Potential overflow in Toradex config block prompts (CONFIG_SYS_CBSIZE-dependent)

PATCH In review Tra Ngo 1 participant 1 message Mar 26

lore
Share & tools
lore

Tra Ngo

author
#0 lore raw

PATCH 3/4 Potential overflow in Toradex config block prompts (CONFIG_SYS_CBSIZE-dependent)

Dear U-Boot maintainers,

I would like to report a potential stack buffer overflow in board/toradex/common/tdx-cfg-block.c related to prompt string construction.

The issue arises from unbounded sprintf() calls into a buffer sized by CONFIG_SYS_CBSIZE, which may be smaller than the literal prompt strings.

This is configuration-dependent and can lead to overflow under certain settings.

I have attached a detailed analysis, including root cause, reproduction, and suggested fix.

This is part of a set of related configuration-dependent issues; I will report others in separate emails.

Please let me know if you would like a patch or further details.

Best regards,
Ngo Tra <https://aka.ms/GetOutlookForMac>