Skip to content
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

lib: updatehub: Fix out-of-bounds access and add flash_img_init return value check #27223

Merged

Conversation

nandojve
Copy link
Member

The flash_img_int return value is not checked for fail conditions. This can result on useless download attempts once image will not be properly recorded. Add return value check and on error execute default treatment.
Fixes #26992.

The struct pollfd context variable is not proper initialized and index is out-of-bounds. Adjusts index to be inside scope boundary.
Fixes #26993.

CC: @otavio

@nandojve nandojve added the area: OTA Over-the-Air Firmware Upgrade label Jul 29, 2020
lib/updatehub/updatehub.c Outdated Show resolved Hide resolved
The struct pollfd context variable is not proper initialized and index
is out-of-bounds. Adjusts index to be inside scope boundary.

Fixes zephyrproject-rtos#26993.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
The flash_img_int return value is not checked for fail conditions.
This can result on useless download attempts once image will not
be properly recorded. Add return value check and on error execute
default treatment.

Fixes zephyrproject-rtos#26992.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
@nandojve nandojve force-pushed the topic/uhu-resource-out-of-bound branch from 8abd3ef to d035a6e Compare July 30, 2020 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: OTA Over-the-Air Firmware Upgrade
Projects
None yet
5 participants