You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First off, trying out eRPC and impressed by what I see so far. Great work.
I have a command with a maximum of string length associated with the parameter. The max length (@max_length) is not properly enforced in either client nor server:
On client side the generated code simply writes the string with writeString(strlen(), (const char*)str, (const char*)), no validation is done
On server side it actually looks worse:
codec->readString() is used, populating size and pointer (uint32_t str_len, char * str_local)
Allocation is done with the @max_length+1
If the read string is not NULL and allocation was successful memcpy() is used with the length of the read string (possible buffer overflow if string sent exceeds @max_length)
The issues I see:
Client side can and should avoid sending content that violets the @max_length
No validation of size, possible buffer overflow(?)
Thank you!
The text was updated successfully, but these errors were encountered:
Hi,
First off, trying out eRPC and impressed by what I see so far. Great work.
I have a command with a maximum of string length associated with the parameter. The max length (@max_length) is not properly enforced in either client nor server:
The issues I see:
Thank you!
The text was updated successfully, but these errors were encountered: