Plist recursekey fix#5108
Open
oh6hay wants to merge 3 commits into
Open
Conversation
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.
One line description of pull request
Fixes the plist parser hanging for an exponentially long time attempting to recurse a valid PLIST that contains a very large number of unique paths to a small number of leaf nodes, using shared references
Description:
This fixes an issue with the plist parser interface's
_RecurseKeymethod. For list elements, the_RecurseKeyrecurses into each list element independently, not checking if the references in a list point to a target already recursed into. This allows constructing a bplist representing a chain of lists, so that each list contains multiple references to the next element in the chain. The_RecurseKeynaively recurses into each reference independently, not checking if it traverses into a node already traversed. The depth check doesn't help here as 15 is plenty of levels to construct an exponentially large amount of unique paths in the chain. This is fixed by also passing a set of already visited objects on the method call. The change also protects against cyclic references, as a treat.Notes:
All contributions to Plaso undergo code review.
This makes sure that the code has appropriate test coverage and conforms to the
Plaso style guide.
One of the maintainers will examine your code, and may request changes. Check off the items below in
order, and then a maintainer will review your code.
Checklist: