-
Notifications
You must be signed in to change notification settings - Fork 7
security(network): sanitize internal state in error messages (TM-INF-016) #909
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingsecuritySecurity vulnerability or hardeningSecurity vulnerability or hardening
Description
Problem
TM-INF-016 is documented as OPEN in the threat model. Multiple error paths leak host-internal details to the sandbox guest:
error.rs:38— wrapsstd::io::Errorvia#[from], which can include real host filesystem pathsnetwork/client.rs:224— wrapsreqwest::Errorwhich can contain resolved IPs, TLS negotiation details, DNS infogit/client.rs— includes VFS paths and remote URLs in errorsscripted_tool/execute.rs:323— uses{:?}(Debug format) whileBashTooluseserror_kind()— inconsistent
Attack scenario
A script running inside the sandbox triggers an error (e.g. curl to an unreachable host, or a filesystem operation on a RealFs mount). The raw error message reveals host-internal information (real paths, resolved IPs) that the sandbox should hide.
Expected behavior
All errors surfaced to the guest should use consistent Display format with sanitized messages. External library errors (std::io, reqwest) should be wrapped to strip host-specific details.
Suggested approach
- Wrap
std::io::Errorwith path sanitization (strip real FS prefixes) - Wrap
reqwest::Errorto redact resolved IPs and TLS details - Use
Displayconsistently, neverDebug({:?}) for guest-facing errors - Add tests that verify error messages from network failures and FS errors don't contain host paths or IPs
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsecuritySecurity vulnerability or hardeningSecurity vulnerability or hardening