A Variable Length Array (VLA) is allocated based on the response received from the STSAFE chip via I2C. However, no sanity check is performed on the response before the allocation. If the response is corrupted, for instance, due to a bit-flip caused by noise on the I2C line, it could trigger a VLA allocation of up to 65 KiB. This would almost certainly lead to a stack overflow and an application crash.
|
PLAT_UI8 filler[filler_size]; |