Repository navigation
Bound Android Binary XML reads to declared chunks ##crash - #26935
Merged
Merged
Conversation
trufae
force-pushed
the
fix-axml-declared-bounds
branch
from
October 9, 2026 05:52
0b7a224 to
8aee614
Compare
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.
Follow-up to #26931: the decoder still accepted strings and node data from outside their declared chunks, including trailing input beyond the XML size.
RStrsfor bounded prefix advancement.RStrBufscratch buffers for UTF-16 conversion, formatted values, and qualified attribute keys, removingstrdupand per-attribute string cleanup from the decoder. Resolve the namespace prefix once per element.pFAjoutput when decoding fails.pFAandpFAj, including >64KB pools, extended lengths, short chunks, all string-lookup callers, repeated long/short attributes, scalar values, and invalid references after successful output. Change the two existing malformed-input unit tests to require rejection.Validation: normal and ASan builds pass; all 54 command cases and five existing AXML unit tests pass in both builds. Three real APK manifests decode successfully, and 20,000 deterministic mutations in both output modes complete without ASan errors.
git diff --checkandsys/lint.sh --allpass. ASan runs useddetect_leaks=0because LeakSanitizer cannot inspect process tasks in this environment.