Skip to content

Backport 89351 to v4.1 branch: Fix operation bounds check for Flash Map API #89351 #93507

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

de-nordic
Copy link
Contributor

@de-nordic de-nordic commented Jul 22, 2025

All functions area using is_in_flash_area_bounds for checking parameters; the function was not immune to integer overflow.
The PR fixes the function and adds test scenario for overflows.

Fixes #89349

Prevent possible overflow in is_in_flash_area_bounds while
validating offset and length of an operation.

Fixes #89349

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 3d4b427)
@zephyrbot zephyrbot added the area: Storage Storage subsystem label Jul 22, 2025
@de-nordic de-nordic force-pushed the backport-89351-to-v4.1-branch branch from d60e223 to 5e2e381 Compare July 22, 2025 13:08
@zephyrbot zephyrbot added the size: XS A PR changing only a single line of code label Jul 22, 2025
Copy link

@de-nordic de-nordic requested review from kartben and nashif July 23, 2025 06:26
@kartben kartben requested a review from fabiobaltieri July 23, 2025 13:06
@dkalowsk dkalowsk added this to the v4.1.1 milestone Jul 23, 2025
@fabiobaltieri fabiobaltieri merged commit 2f3c4c0 into v4.1-branch Jul 24, 2025
25 checks passed
@fabiobaltieri fabiobaltieri deleted the backport-89351-to-v4.1-branch branch July 24, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Storage Storage subsystem size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants