Skip to content

Conversation

@wizzomafizzo
Copy link
Member

Summary

  • Add bounds checking in parsePathTable to prevent slice bounds out of range panic when parsing malformed ISO9660 images

Background

The fuzzer found that malformed ISO9660 images with truncated path table entries could cause a panic. The path table entry's dirNameLen field could specify a length exceeding the remaining buffer, causing a slice bounds panic.

Changes

  • Validate that i+8+dirNameLen doesn't exceed buffer length before slicing
  • Return a descriptive error instead of panicking
  • Removed redundant bounds check that was after the loop condition

Test plan

  • All existing unit tests pass
  • Fuzz test seeds pass
  • Lint passes with 0 issues

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Add bounds checking in parsePathTable to prevent slice bounds out of
range panic when parsing malformed ISO9660 images with truncated path
table entries.

Found by fuzzing: the path table entry's dirNameLen field could specify
a length exceeding the remaining buffer, causing a panic when slicing.
@wizzomafizzo wizzomafizzo force-pushed the fix/iso9660-path-table-bounds branch from 110d8b6 to c5214f3 Compare December 10, 2025 09:59
@wizzomafizzo wizzomafizzo merged commit 2916d33 into main Dec 10, 2025
9 checks passed
@wizzomafizzo wizzomafizzo deleted the fix/iso9660-path-table-bounds branch December 10, 2025 10:11
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.

2 participants