-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ws_transport): Fix crash when reading (IDFGH-13657) #14536
Conversation
When parsing WS framing protocol integer promotion would cause invalid values to be read. Acting upon these values would eventually cause a crash Fixes esp-protocols#645
👋 Hello Sean-Der, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
@david-cermak FYI @suren-gabrielyan-espressif I see lots of your commits re: Linux support. This would be really helpful for Linux users (how I find it myself) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the fixes!
Although it seems easier to declare data_ptr
as uint8_t
, there might be other conversion issues as the default transport buffer is just char
. That's why I think this fix is probably the best option for now.
(maybe we can build linux target with -funsigned-char
)
Description
When parsing WS framing protocol integer promotion would cause invalid values to be read. Acting upon these values would eventually cause a crash
Related
Fixes espressif/esp-protocols#645
Testing
If you send a message longer then 128 to the websocket echo service the response will cause a crash. This can easily be reproduced with the esp-protocols websocket example.
Results in the following output
Checklist
Before submitting a Pull Request, please ensure the following: