Skip to content

Bound embedded Portable PDB decompression - #4330

Open
siegfriedpammer wants to merge 1 commit into
masterfrom
fix/embedded-pdb-size-limit
Open

siegfriedpammer wants to merge 1 commit into
masterfrom
fix/embedded-pdb-size-limit

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Embedded Portable PDB data declares its decompressed size before the framework and Mono.Cecil readers inflate it. A small crafted assembly can therefore request nearly 2 GiB as soon as it is opened.

Reject declarations over 128 MiB before inflation in ILSpyX symbol loading, PdbDumper, and the metadata debug-directory tree.

Addresses scan finding ANT-2026-JVI3IFUZ.

Tests:

  • OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet test --project ILSpy.Tests/ILSpy.Tests.csproj --no-restore --report-trx --filter "FullyQualifiedName~EmbeddedPdbTreeTests" (2 passed)
  • OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet test --project ILSpy.Tests/ILSpy.Tests.csproj --no-restore --report-trx --filter "FullyQualifiedName~PdbDumperTests" (2 passed)

Embedded Portable PDB metadata declares its decompressed size before the framework and Cecil readers inflate it. Reject oversized declarations before those readers allocate native or managed memory, keeping symbol loading and debug-directory inspection bounded.

Assisted-by: OpenCode:gpt-5.6-luna:OpenCode
@siegfriedpammer
siegfriedpammer force-pushed the fix/embedded-pdb-size-limit branch from d980605 to f173520 Compare November 8, 2026 11:26

This branch has not been deployed

No deployments
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.

1 participant