Skip to content

feat(variables): Begin reading minidump memory for variables - #2035

Merged
Dav1dde merged 2 commits into
masterfrom
dav1d/native-memory
Aug 31, 2026
Merged

feat(variables): Begin reading minidump memory for variables#2035
Dav1dde merged 2 commits into
masterfrom
dav1d/native-memory

Conversation

@Dav1dde

@Dav1dde Dav1dde commented Aug 28, 2026

Copy link
Copy Markdown
Member

Threads the minidump down to the variable extraction and implements a basic frame pointer offset resolution.

Obviously there is still a lot left to do, interpreting the memory based on the type etc, this is just threading down the minidump.

Note: This uses scroll version 0.12 instead of 0.12 because of the minidump crate.

@Dav1dde
Dav1dde requested a review from a team as a code owner August 28, 2026 13:32
@Dav1dde
Dav1dde force-pushed the dav1d/native-memory branch from 95252ee to 97344d7 Compare August 28, 2026 13:35
Comment thread crates/symbolicator-native/src/symbolication/native.rs Outdated
cursor[bot]

This comment was marked as resolved.

@Dav1dde
Dav1dde force-pushed the dav1d/native-memory branch from 97344d7 to fd3517f Compare August 28, 2026 17:55

@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.

Reviewed by Cursor Bugbot for commit fd3517f. Configure here.

Comment thread crates/symbolicator-native/src/symbolication/process_minidump.rs
Comment thread crates/symbolicator-native/src/symbolication/process_minidump.rs Outdated
Comment thread crates/symbolicator-native/src/memory.rs Outdated
Comment thread crates/symbolicator-native/src/symbolication/process_minidump.rs
@Dav1dde
Dav1dde enabled auto-merge (squash) August 31, 2026 08:00
@Dav1dde
Dav1dde merged commit 5240102 into master Aug 31, 2026
27 checks passed
@Dav1dde
Dav1dde deleted the dav1d/native-memory branch August 31, 2026 08:20
if extract_variables {
vars = do_extract_variables(&source_location, symcache, &frame.registers);
if let Some(memory) = memory {
vars = do_extract_variables(&source_location, symcache, &frame.registers, memory);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Variable extraction materializes attacker-sized memory dumps without an output cap

When variable extraction is enabled, a SymCache-derived primitive or pointer size controls the minidump range read for a frame-offset variable. Although the memory accessor checks that the range exists, a successful range can be as large as the accepted dump and format!("{s:?}") materializes an uncapped, substantially larger String that is retained in the response, potentially exhausting worker memory.

Evidence
  • /minidump and /symbolicate-any accept options.extract_variables; minidump processing passes Some(Arc::new(minidump)) as the memory source to native symbolication (crates/symbolicator/src/endpoints/minidump.rs:47-50, crates/symbolicator-native/src/symbolication/process_minidump.rs:672-676).
  • resolve_variable_value obtains TypeSize::Bytes(size) from SymCache primitive/pointer types and uses that value for FrameOffset memory access (crates/symbolicator-native/src/symbolication/native.rs:212-215, 231-257); no application-level maximum is applied to size.
  • get_memory_at_address safely rejects ranges beyond the mapped memory region, but a valid range may still span the dump's large memory region (crates/symbolicator-native/src/memory.rs:15-27). The fallback then Debug-formats every byte into an owned String with no output cap (crates/symbolicator-native/src/symbolication/native.rs:255-257), and the String is retained in the variables map at lines 185-195.
  • The local minidump body limit is 250 MiB (crates/symbolicator-service/src/config.rs:663-665), which limits input bytes but not the formatted output or serialization work; the remote attachment path additionally streams the storage response without applying that limit (crates/symbolicator-native/src/symbolication/attachments.rs:36-52).
Also found at 1 additional location
  • crates/symbolicator-native/src/symbolication/native.rs:256-258

Identified by Warden · wrdn-dos-review · 88N-CRQ

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