Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented Zip Bomb protection in ImportExportService by limiting total extraction size to 1GB and entry count to 10,000. This prevents Denial of Service attacks via malicious backup files. Also updated .jules/sentinel.md with the new vulnerability record.


PR created automatically by Jules for task 552853266710299786 started by @Tr1sma

🚨 Severity: HIGH
πŸ’‘ Vulnerability: The `RestoreFromBackupAsync` method was vulnerable to Zip Bomb (DoS) attacks. It allowed extracting archives of unlimited size and entry count, which could exhaust disk space or memory if a malicious high-compression archive was processed.
🎯 Impact: An attacker could crash the application or fill the device storage by inducing the user to restore a malicious backup file.
πŸ”§ Fix:
- Added `MaxTotalExtractionSize` constant (1 GB).
- Added `MaxEntryCount` constant (10,000).
- Implemented loop-level validation to track cumulative extraction size and entry count, throwing `IOException` if limits are exceeded.
βœ… Verification: Code analysis confirms that `totalSize` and `entryCount` are checked before extraction proceeds for each entry.
@google-labs-jules
Copy link
Contributor Author

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant