Skip to content

🐛 Fix two M4A fuzz findings: non-plain integers, unbounded chapter timings - #25

Merged
simonhull merged 2 commits into
mainfrom
fix/m4a-canonical-int
Nov 12, 2026
Merged

simonhull merged 2 commits into
mainfrom
fix/m4a-canonical-int

Conversation

@simonhull

@simonhull simonhull commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Two fuzz findings, both also in v0.14.0:

  1. Non-plain integers. FuzzWriteRoundTrip: Set("©mvi", "00") wrote the integer 0, which reads back as "0". Any integer item did the same with "07", "+7" or "-0".
    • encodeInt now refuses a value unless it is in plain decimal, the form the reader returns.
    • isMovementIndex applies the same rule, so a SeriesPart such as "04" goes to the SERIES PART text item instead of being stored in ©mvi as 4.
    • The crasher becomes a fuzz seed.
  2. Unbounded chapter timings. FuzzParseM4A (CI): a 7.6 KB file whose QuickTime chapter track has no readable stsz made Parse allocate 41 MB. chapterSampleBound fell back to the global cap of 2^20 samples. Every chapter sample needs at least 2 bytes of the file, so the fallback is now size/2 (still capped at 2^20).
    • New allocation test.

Both new tests fail without their fix. mise run ci passes locally, and so does FuzzParseM4A for 60 s.

@simonhull simonhull changed the title 🐛 Refuse M4A integer items not in plain decimal 🐛 Fix two M4A fuzz findings: non-plain integers, unbounded chapter timings Nov 12, 2026
@simonhull
simonhull merged commit bdd19ec into main Nov 12, 2026
6 checks passed
@simonhull
simonhull deleted the fix/m4a-canonical-int branch November 12, 2026 19:37
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