fix: systematic deep dive audit - security, extraction, fuzz, dead code#60
Merged
AndrewAltimit merged 4 commits intomainfrom Mar 10, 2026
Merged
fix: systematic deep dive audit - security, extraction, fuzz, dead code#60AndrewAltimit merged 4 commits intomainfrom
AndrewAltimit merged 4 commits intomainfrom
Conversation
…moval Security fixes: - Cap read_buf in networking client/listener to prevent unbounded memory growth from malicious peers (16KB client, 1KB listener with disconnect) - Cap all MP4 demux_lite sample tables at 10M entries to prevent OOM from malicious MP4 files (stts, ctts, stsc, stco, co64, stsz, stss) - Use checked_add in sample-to-chunk accumulator to prevent integer overflow on malformed MP4 sample tables - StreamingBuffer: return io::Error instead of zero-filled reads when demuxer reads from evicted buffer region (prevents silent corruption) Architecture: - Extract TV Guide from AppRunner inline handling into TvGuideApp implementing the App trait in oasis-app-tv-guide, matching the delegate pattern used by all other apps (~200 lines removed from runner.rs) - Remove 572 lines of dead legacy code from PSP backend views.rs (terminal, file manager, settings, radio, music rendering superseded by SDI-based views) Safety documentation: - Add SAFETY comments to 10 unsafe blocks in ffmpeg_decoder.rs (AVIO callbacks, format context access, codec operations) - Add SDL3 field ordering safety documentation explaining the texture/texture_creator drop order dependency - Document ctts signed offset cast as intentional per ISO 14496-12 Fuzz targets: - Add browser fuzz targets: HTML tokenizer, CSS parser, full pipeline - Add terminal fuzz target: command interpreter with MemoryVfs - Existing video fuzz targets (demux_lite, avcc) already present Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Code ReviewIssues (if any)(none) Previous Issues (if any)(none) Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to Gemini/Codex review. Iteration: 1/5 Co-Authored-By: AI Review Agent <noreply@anthropic.com>
Owner
Author
Review Response Agent (Iteration 1)Status: Changes committed, pushing... Commit: Fixed Issues
Ignored Issues
Deferred to Human
Notes
Automated summary of agent fixes. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)(none) Previous Issues (for incremental reviews)
Suggestions (if any)(none) Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Owner
Author
Review Response Agent (Iteration 2)Status: No changes needed
Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but no file modifications were detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Systematic fixes from a comprehensive deep dive audit of the codebase:
MAX_LINE_LEN16KB) in client/listener to prevent memory exhaustion; MP4 demux table size limits (MAX_TABLE_ENTRIES10M) andchecked_addin sample-to-chunk accumulator to prevent OOM/overflow from malicious media filesio::Errorinstead of silent zero-fill, preventing decode corruptionAppRunnerto properTvGuideAppimplementing theApptrait (~200 lines removed from runner.rs)Test plan
cargo build --workspace --releasepassescargo test --workspacepasses (5,400+ tests)cargo clippy --workspace -- -D warningspassescargo fmt --all -- --checkpassesGenerated with Claude Code (https://claude.com/claude-code)