Skip to content

system: nxinit: bound debug argv dump#3610

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
Old-Ding:codex/nxinit-debug-argv-bounds
Jul 7, 2026
Merged

system: nxinit: bound debug argv dump#3610
xiaoxiang781216 merged 1 commit into
apache:masterfrom
Old-Ding:codex/nxinit-debug-argv-bounds

Conversation

@Old-Ding

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

Copy link
Copy Markdown
Contributor

Summary

  • check the service argv bound before reading the current debug-dump entry
  • keep the existing NULL-terminated dump behavior once the index is in range

Root cause

init_dump_service() evaluated s->argv[i] before checking i < nitems(s->argv). Service argument arrays are zero-initialized, but a full parsed argument list can fill the array without an in-array NULL terminator. With CONFIG_SYSTEM_NXINIT_DEBUG enabled, the dump loop could then read one entry past the array.

Testing

  • git diff --check
  • git show --stat --check --format=fuller HEAD

Build not run locally because this Windows machine does not have make, cmake, gcc, clang, or cc installed.

Check the service argv array bound before reading the current entry in the debug dump loop. A full argument array may not have an in-array NULL terminator, so the old condition could read one entry past the array while CONFIG_SYSTEM_NXINIT_DEBUG is enabled.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>

@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 :-)

@acassis

acassis commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@xiaoxiang781216 the download of ameba SDK is failing with permission error 403, probably it requires password or some captcha

@cederom

cederom commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@Old-Ding please update git commit signature to valid email address as in other pr series :-)

@xiaoxiang781216 xiaoxiang781216 merged commit 64f9e8a into apache:master Jul 7, 2026
36 of 41 checks passed
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.

5 participants