Skip to content

IntegrityVerifier resolves an indirect KDFSalt after decryption is installed #478

Closed

Description

@michaelstonis

Found while fixing #398 (PR #458), left unchanged there.

DocumentSecurity.Open now evicts everything the encryption dictionary's entries loaded before decryption is installed, and keeps the values the handler read in PdfSecurity.ReadBeforeDecryption. IntegrityVerifier still resolves KDFSalt (ISO 32000-2 §7.6.7, integrity protection) after the decryptor is installed, so an indirect KDFSalt would be read through decryption instead of as stored. No sample or fuzz input hits this today (KDFSalt is a direct string in every file seen).

Expected: KDFSalt is read as stored (§7.6.2: strings in the encryption dictionary are not encrypted), like the other encryption dictionary entries after #398.

Test: an AES-256-GCM file with an indirect KDFSalt verifies its integrity MAC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:securitybug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions