Repository navigation
π‘οΈ Sentinel: [HIGH] Fix zip bomb DoS vulnerability during archive inspection - #308
Conversation
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: HIGH
π‘ Vulnerability:
Unbounded stream decompression (
entry.read_to_string(&mut s)) when readinginfo.jsonfrom untrusted mod zip files.π― Impact:
A malicious or crafted mod archive (zip bomb) could expand indefinitely into memory, leading to an Out-Of-Memory (OOM) crash and Denial of Service (DoS) during background mod scans or download verification.
π§ Fix:
MAX_INFO_JSON_BYTES(1 MiB ceiling) insrc-tauri/src/core/services/mod_store.rs.(&mut entry).take(MAX_INFO_JSON_BYTES + 1).read_to_string(&mut s)in bothmod_store.rs(read_info_json) anddownloader.rs(verify_mod_zip_sync).AppError::Parse("info.json exceeds maximum allowed size").rejects_oversized_info_json_to_prevent_zip_bomb_dosinmod_store.rs..jules/sentinel.md.β Verification:
Ran full backend test suite (
cargo test --manifest-path src-tauri/Cargo.toml, 142 passing tests) and frontend build check (pnpm build).PR created automatically by Jules for task 14842648543488561979 started by @TheDragonSoft