Skip to content

revocation: cap index table allocation size#193

Merged
cpu merged 1 commit into
rustls:mainfrom
cpu:ci/cpu-fuzz-index
Jul 13, 2026
Merged

revocation: cap index table allocation size#193
cpu merged 1 commit into
rustls:mainfrom
cpu:ci/cpu-fuzz-index

Conversation

@cpu

@cpu cpu commented Jul 11, 2026

Copy link
Copy Markdown
Member

The binary index is considered trusted data, but it's sensible to try and cap the allocation for the table data by the file's overall size to avoid corrupted files with incorrect counts causing over-sized allocations.

I bumped into this doing some smoke-test fuzzing of the index decoder. I'm not sure whether adding a fuzz crate with first-party CI integration is worthwhile, but if there's interest I could clean that up and PR it as well.

@cpu cpu self-assigned this Jul 11, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing cpu:ci/cpu-fuzz-index (bc729aa) with main (0447cb0)

Open in CodSpeed

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread upki/src/revocation/index.rs Outdated
The binary index is considered trusted data, but it's sensible to try
and cap the allocation for the table data by the file's overall size to
avoid corrupted files with incorrect counts causing oversized
allocations.
@cpu cpu force-pushed the ci/cpu-fuzz-index branch from f525270 to bc729aa Compare July 13, 2026 13:49
@cpu cpu enabled auto-merge July 13, 2026 13:50
@cpu cpu added this pull request to the merge queue Jul 13, 2026
Merged via the queue into rustls:main with commit 9655fd7 Jul 13, 2026
16 checks passed
@cpu cpu deleted the ci/cpu-fuzz-index branch July 13, 2026 14:01
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