Skip to content

fix(minidump): Always validate minidump and extract only limited bytes - #6282

Open
tobias-wilfert wants to merge 4 commits into
masterfrom
tobias-wilfert/fix/attachment-follow-ups
Open

fix(minidump): Always validate minidump and extract only limited bytes#6282
tobias-wilfert wants to merge 4 commits into
masterfrom
tobias-wilfert/fix/attachment-follow-ups

Conversation

@tobias-wilfert

@tobias-wilfert tobias-wilfert commented Aug 3, 2026

Copy link
Copy Markdown
Member

These are some issues that came up in previous PRs (related to the large attachments/minidump work). Specifically this adds a check to streamed minidumps to ensure that they are 'valid' (since this was deemed a cheap check). Furthermore this also fixes a logic-path for buffered minidumps where size limits were not correctly applied.

Fix INGEST-983

@tobias-wilfert tobias-wilfert self-assigned this Aug 3, 2026
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

INGEST-983

@tobias-wilfert tobias-wilfert changed the title WIP: fix(minidump): Always validate minidump and extract only limited bytes fix(minidump): Always validate minidump and extract only limited bytes Aug 4, 2026
@tobias-wilfert
tobias-wilfert marked this pull request as ready for review August 4, 2026 06:24
@tobias-wilfert
tobias-wilfert requested a review from a team as a code owner August 4, 2026 06:24

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e970594. Configure here.

DiscardAttachmentType::Minidump,
)),
None => BadStoreRequest::InvalidBody(std::io::Error::other(e)),
})?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing reject on early failures

Medium Severity

In raw_minidump_to_item, failures from to_bytes size limiting and from decode_and_validate_stream return without rejecting the Managed item. Drop then emits Internal for attachment quantities instead of ItemTooLarge or InvalidMinidump. Nearby upload_stream_checked already rejects with the correct outcome before returning.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e970594. Configure here.

} else {
let minidump_data = request.extract().await?;
let minidump_data =
axum::body::to_bytes(request.into_body(), state.config().max_attachment_size())

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.

Shouldn't the middleware/configured limit on the route already enforce this, or was that removed due to the streaming appraoch?

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