Update vendored TinyEXIF to 8c22aff - #72
Merged
Merged
Conversation
|
| Filename | Overview |
|---|---|
| lib/TinyEXIF/TinyEXIF.cpp | Replaces the vendored parser implementation with the newer upstream snapshot, including bounds-checking and metadata-field tracking changes; no eligible blocking issue remains. |
| lib/TinyEXIF/TinyEXIF.h | Updates the public vendored declarations and metadata structures to match the newer TinyEXIF snapshot. |
| lib/TinyEXIF/README.md | Documents the new field-presence API and updates licensing and attribution. |
| lib/kodi-TinyEXIF-note.txt | Updates the recorded upstream TinyEXIF revision and vendoring information. |
Reviews (2): Last reviewed commit: "Update vendored TinyEXIF to 8c22aff" | Re-trigger Greptile
Contributor
|
Jenkins not happy? |
The copy here was pinned at 6e56015 (April 2021) and is missing two upstream memory-safety fixes: 841e2929, a heap buffer overflow in EntryParser::Fetch, and b6ea1b7b, an integer overflow in the parseString bounds check. The first is reachable. Fuzzing the pinned copy under ASan segfaulted after 18 executions: EntryParser::parse32 TinyEXIF.cpp:283 EntryParser::parseRational TinyEXIF.cpp:297 EntryParser::Fetch(double&, unsigned) TinyEXIF.cpp:256 EXIFInfo::parseIFDExif TinyEXIF.cpp:615 which is exactly the function 841e2929 adds a bounds check to. EXIF parsing runs whenever Kodi reads tags for a picture, so the input is attacker controlled. The upstream proof-of-concept samples do not reproduce it - the older parser rejects them as corrupt before reaching that code - so this was found by fuzzing the pinned version rather than by replaying published cases. After the update that input parses cleanly and 3.3M fuzz executions found nothing. Only parseFrom(), parseFromEXIFSegment(), ImageWidth, ImageHeight and Orientation are used here, all unchanged upstream. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
cinema-ONE
force-pushed
the
tinyexif-resync
branch
from
August 30, 2026 11:35
e6832d3 to
33a19e1
Compare
Contributor
Author
|
Rebased — you were right. My earlier "the red clears once the API PRs merge" was wrong: this branch was still based on the pre-merge Now on current Written by my AI co-author (Claude Code); posted from my account. |
Contributor
|
Thanks! |
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.
Updates the vendored TinyEXIF from
6e56015(April 2021) to8c22aff(August 2026).Why
The pinned copy is missing two upstream memory-safety fixes —
841e2929(heap buffer overflow inEntryParser::Fetch) andb6ea1b7b(integer overflow in theparseStringbounds check).The first is reachable here. Fuzzing the pinned copy under ASan segfaulted after 18 executions:
That is exactly the function
841e2929adds the missingoffset + 8 > lencheck to. EXIF parsing runs whenever Kodi reads tags for a picture, so the input is attacker-controlled.Worth noting for anyone re-checking this: upstream's published PoC samples do not reproduce it. The older parser rejects them as
PARSE_CORRUPT_DATAbefore reaching that code, so replaying them says "not affected". The crash was found by fuzzing this pinned version specifically.Verification
6e56015)8c22aff)Only
parseFrom(),parseFromEXIFSegment(),ImageWidth,ImageHeightandOrientationare used here, all unchanged upstream. Builds clean.CI will be red, and not because of this
This branch is off
Piers, which does not compile againstxbmc/xbmcmaster any more: ImageDecoder API 3.1.0 (xbmc/xbmc#29068) changed theDecode()signature, and CI here builds against master. #71 fixes that, and the two compose — I built this branch on top of it and both compile.They are independent concerns and can merge in either order.
Written by my AI co-author (Claude Code); posted from my account.