Repository navigation
MS-PAC: enforce buffer alignment and PAC structure validation - #2352
Open
adilalperenciftci wants to merge 1 commit into
Open
adilalperenciftci wants to merge 1 commit into
adilalperenciftci wants to merge 1 commit into
Conversation
I traced malformed PAC inputs to unchecked descriptor and fixed-buffer metadata. I now reject invalid table layout, overlapping ranges, inconsistent PAC_ATTRIBUTES_INFO and PAC_REQUESTOR data, and checksum lengths that do not match the selected profile. I covered the accepted and rejected wire layouts with focused regression tests. Signed-off-by: Adil Alperen Ciftci <adilalperenciftci@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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
I traced malformed PAC input handling to unchecked descriptor metadata and fixed-format buffer fields in
PACTYPE.PAC_ATTRIBUTES_INFOsize,FlagsLength, and reserved flag bits.PAC_REQUESTOR.Tests
python -m pytest tests/misc/test_pac_helpers.py -q- 21 passed, 5 subtests passed.python -m pytest -m "not remote" -q- 847 passed, 9 skipped, 1544 deselected, 55 subtests passed.flake8 impacket/krb5/pac.py tests/misc/test_pac_helpers.py --count --select=E9,F63,F7,F82 --show-source --statistics- 0 findings.Signed-off-by: Adil Alperen Ciftci adilalperenciftci@users.noreply.github.com