GRI-2014: cap the slide-xml read in longest_slide_advance_seconds #194
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!194
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2014-pptx-slide-xml-read-cap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from Vivy's non-blocking review note on PR #193 (forge #189):
longest_slide_advance_secondscalledread_to_stringon appt/slides/slideN.xmlzip entry with no size limit, so a crafted.pptxupload could decompress an arbitrarily large entry straight into memory (a zip bomb on this upload path).Change
Cap the read at 8 MiB (a real slide part is a few KB). Past the cap, the file is treated the same as any other unreadable
.pptx—longest_slide_advance_secondsreturnsErr(()), soeffective_idle_afterfalls back to the fullrender_timeout_seconds(safe: slower, never truncates).Tests
New unit test
effective_idle_after_falls_back_to_the_render_timeout_when_a_slide_entry_is_oversized, writing a real zip with a >8 MiB slide entry and asserting the render-timeout fallback.cargo test -p server --lib pptx_video: 23/23 green.fmt/clippy -D warningsclean../scripts/local-gates.sh --rust-only: every gate passed.