Skip to content

Backport 89351 to v3.7 branch: Fix operation bounds check for Flash Map API #93503

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

Open
wants to merge 1 commit into
base: v3.7-branch
Choose a base branch
from

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)
@github-actions github-actions bot added the area: Storage Storage subsystem label Jul 22, 2025
@nashif
Copy link
Member

nashif commented Jul 22, 2025

@de-nordic This should not be fixing a 'Failed to backport' issue, you have to reference the original issue being fixed

@de-nordic de-nordic force-pushed the backport-89351-to-v3.7-branch branch from 566bc34 to 97cf162 Compare July 22, 2025 13:05
@de-nordic
Copy link
Contributor Author

Had to drop test scenario, because it uses newer macros not supported in 3.7.

@github-actions github-actions bot 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
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.

3 participants