gecko_sdk icon indicating copy to clipboard operation
gecko_sdk copied to clipboard

Fix memory corruption in sl_cli_input.c

Open megholm opened this issue 2 years ago • 1 comments

See https://community.silabs.com/s/question/0D58Y00009kws54SAA/bufferoverflowmemorycorruption-in-slcliinputc-when-using-history?language=en_US for an elaborate description.

If you "craft" (or are so unlucky that) your input-commands on the CLI align so that they fill up the history-buffer entirely, recalling a previous command from the history buffer with arrow-up/down and executing, will result in a buffer-overflow and trash neighboring data-structure.

megholm avatar Jan 23 '23 07:01 megholm

Thanks for reporting this issue. We will address this bug in our next patch.

aautotte avatar Jan 27 '23 20:01 aautotte

Looks the issue was resolved in https://github.com/SiliconLabs/gecko_sdk/blob/a146f045bb8a99d9229dc40ffea5ed407847cacd/platform/service/cli/src/sl_cli_input.c#L318

lmnotran avatar Apr 26 '24 19:04 lmnotran

Closed since it was addressed.

silabs-Tabi avatar Apr 26 '24 22:04 silabs-Tabi