system: fastboot: bound filedump path parsing#3608
Open
Old-Ding wants to merge 2 commits into
Open
Conversation
cederom
reviewed
Jul 6, 2026
cederom
reviewed
Jul 6, 2026
b7225fa to
44084f6
Compare
44084f6 to
418c79e
Compare
418c79e to
bbebcb6
Compare
Build the filedump sscanf format with a PATH_MAX - 1 path width so the path token cannot overflow upload_param.u.file.path while preserving the existing filedump argument forms. Signed-off-by: Old-Ding <ai.neo.ae86@gmail.com>
bbebcb6 to
4c239f6
Compare
Parse the filedump path token into the existing PATH_MAX-sized upload path buffer before reading the optional offset and size arguments. This keeps the parser bounded without building a scanf format string at runtime. Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
xiaoxiang781216
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fastboot filedumppath argument into the existingPATH_MAXupload path buffer before parsing optional offset and size values.pathandpath offset size.Testing
git diff --checkgit show --stat --check --format=fuller HEADcheck,Lint,Fetch-Source, andlabelerpassed after the latest update.CI notes
Linux (sim-02)failure is in NuttXsim/login:CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD is not set. That configuration is outside this PR'ssystem/fastboot/fastboot.cdiff; later matrix jobs were cancelled after that failure.PATH_MAXtokenization update, although GitHub can continue to show the prior changes-requested decision until reviewer state refreshes.