Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
mbed-os-example-wifi hangs on ODIN-W2 #6003
Steps to reproduce
Narrowed the issue down to MD5 calculation. My guess is that the binary driver (libublox-odin-w2-driver) uses MD5.
It is also used in this file https://github.com/ARMmbed/mbed-os/blob/master/features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_tcp_isn.c but the mbed-os-example-wifi hangs before the code is executed.
I think I've located where it goes wrong. In the function lwip_hook_tcp_isn the MD5 context is created on the stack but there is no initialization of the struct and therefore bogus values(especially length field is wrong 0xd8) are used in lwip_md5_update resulting in stack overwrite.
@adustm Shouldn't lwip_md5_starts clear the whole struct or how is this supposed to work?
The md5_context is initialialized in the md5_init function.
@adustm is right: The usage of any context structure in Mbed TLS must be delimited by calls to the respective