Skip to content

Comments

Validate PE attribute certificate table bounds#488

Merged
mtrojnar merged 3 commits intomtrojnar:masterfrom
olszomal:pe_table
Feb 9, 2026
Merged

Validate PE attribute certificate table bounds#488
mtrojnar merged 3 commits intomtrojnar:masterfrom
olszomal:pe_table

Conversation

@olszomal
Copy link
Collaborator

@olszomal olszomal commented Feb 9, 2026

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Issue number: N/A

Current Behavior

The PE signature (attribute certificate) table is parsed without sufficient validation of offsets and lengths, which may lead to out-of-bounds reads or infinite loops when processing malformed inputs.

New Behavior

The signature table is now validated against file bounds, entry sizes, and alignment rules, causing malformed inputs to be rejected safely.

Scope of Changes

Added bounds and consistency checks to PE signature table validation; no behavior changes for valid PE files.

Testing

  • Existing tests
  • New tests added
  • Manual testing

Additional Notes

License Declaration

  • I hereby agree to license my contribution under the project's license.

@mtrojnar mtrojnar merged commit 2a5409b into mtrojnar:master Feb 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants