Skip to content

system: fastboot: bound filedump path parsing#3608

Open
Old-Ding wants to merge 2 commits into
apache:masterfrom
Old-Ding:codex/fastboot-bound-filedump-path
Open

system: fastboot: bound filedump path parsing#3608
Old-Ding wants to merge 2 commits into
apache:masterfrom
Old-Ding:codex/fastboot-bound-filedump-path

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Tokenize the fastboot filedump path argument into the existing PATH_MAX upload path buffer before parsing optional offset and size values.
  • Preserve the existing accepted filedump argument forms: path and path offset size.
  • Keep the optional offset and size parsing behavior unchanged.

Testing

  • git diff --check
  • git show --stat --check --format=fuller HEAD
  • GitHub Actions check, Lint, Fetch-Source, and labeler passed after the latest update.

CI notes

  • Current Linux (sim-02) failure is in NuttX sim/login: CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD is not set. That configuration is outside this PR's system/fastboot/fastboot.c diff; later matrix jobs were cancelled after that failure.
  • Thread-aware review collection shows no active unresolved review threads after the PATH_MAX tokenization update, although GitHub can continue to show the prior changes-requested decision until reviewer state refreshes.

Comment thread system/fastboot/fastboot.c
Comment thread system/fastboot/fastboot.c
Comment thread system/fastboot/fastboot.c

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Old-Ding, please note remarks, also please update git commit signature to valid email :-)

@Old-Ding Old-Ding force-pushed the codex/fastboot-bound-filedump-path branch from b7225fa to 44084f6 Compare July 8, 2026 02:42
@Old-Ding Old-Ding force-pushed the codex/fastboot-bound-filedump-path branch from 44084f6 to 418c79e Compare July 8, 2026 06:15
@github-actions github-actions Bot added Size: XS and removed Size: S labels Jul 8, 2026
@Old-Ding Old-Ding force-pushed the codex/fastboot-bound-filedump-path branch from 418c79e to bbebcb6 Compare July 8, 2026 13:51
Comment thread system/fastboot/fastboot.c Outdated
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>
@Old-Ding Old-Ding force-pushed the codex/fastboot-bound-filedump-path branch from bbebcb6 to 4c239f6 Compare July 9, 2026 01:57
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>
@github-actions github-actions Bot added Size: S and removed Size: XS labels Jul 10, 2026
@xiaoxiang781216 xiaoxiang781216 requested a review from cederom July 10, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants