diff options
| author | Ngo Luong Thanh Tra <[email protected]> | 2026-03-28 13:01:32 +0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-13 17:42:58 -0600 |
| commit | 564e180d701f3946e6adc7895f2524728b985f03 (patch) | |
| tree | 9e16f60337a590806e346a57fe972c54f9cd1263 /scripts/code_size_compare.py | |
| parent | e228b6a50418e261ee09fa326464935acdabe610 (diff) | |
board: toradex: fix tdx-cfg-block prompt buffer overflow
Replace unbounded sprintf() with snprintf() using sizeof(message)
as the bound for all prompt string assignments in
get_cfgblock_interactive(), get_cfgblock_carrier_interactive(),
do_cfgblock_carrier_create() and do_cfgblock_create(). The
previous calls had no size limit and could overflow the
CONFIG_SYS_CBSIZE-sized stack buffer if SYS_CBSIZE was configured
smaller than the longest prompt string (71 bytes).
Fixes: 8b6dc5d3943c ("toradex: tdx-cfg-block: Cleanup interactive cfg block creation")
Signed-off-by: Ngo Luong Thanh Tra <[email protected]>
To: [email protected]
Diffstat (limited to 'scripts/code_size_compare.py')
0 files changed, 0 insertions, 0 deletions
