Repository navigation
π‘οΈ Sentinel: Cap mod info.json decompression stream reads - #320
google-labs-jules[bot] wants to merge 1 commit into
Conversation
Cap decompressed stream reads from untrusted mod archive entries to 1 MiB to protect against decompression bombs (Zip Bombs) and unbounded memory allocation / OOM Denial of Service.
|
π 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. |
π‘οΈ Sentinel: [MEDIUM] Mitigate Zip Bomb / Unbounded Decompression in Mod Archives
src-tauri/src/core/services/mod_store.rsandsrc-tauri/src/core/services/downloader.rs,entry.read_to_string(&mut s)decompressedinfo.jsonfrom untrusted mod ZIP files (both scanned locally and downloaded from mirror storage) directly into memory without bounding the read stream size.info.jsoncould cause unbounded memory allocation and an Out-Of-Memory (OOM) crash / Denial of Service.MAX_INFO_JSON_BYTES: u64 = 1_048_576(1 MiB) in bothmod_store.rsanddownloader.rs.(&mut entry).take(MAX_INFO_JSON_BYTES + 1).read_to_string(...)and returned an explicit error if the size exceeds 1 MiB.rejects_oversized_info_json_in_zipandverify_mod_zip_sync_rejects_oversized_info_json..jules/sentinel.md.cargo test --manifest-path src-tauri/Cargo.toml(143 unit tests passing) andpnpm build.PR created automatically by Jules for task 13733267906614674048 started by @TheDragonSoft