Skip to content

Bump OpenCTM to fix heap overflows on crafted .ctm files (S9S disclosure) - #6800

Merged
Fedr merged 7 commits into
masterfrom
fix/openctm-str-overflow
Sep 8, 2026
Merged

Bump OpenCTM to fix heap overflows on crafted .ctm files (S9S disclosure)#6800
Fedr merged 7 commits into
masterfrom
fix/openctm-str-overflow

Conversation

@Fedr

@Fedr Fedr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps our OpenCTM dependency to the two fixes from the S9S Security Research coordinated disclosure, both reachable from ctmLoad() on a single crafted .ctm file and therefore from our own fromCtm load path (source/MRIOExtras/MRCtm.cpp), since the defects are in the library's allocation code, not in the read callback:

Pinned to OpenCTM master at eae87a4d9ac229bdc7c32492c84bd7cb1329e5c4, the squash-merge of MeshInspector/OpenCTM#3 on top of MeshInspector/OpenCTM#2.

Changes

OpenCTM reaches the build three different ways, so all three pins move together:

  • thirdparty/OpenCTM-git submodule (Linux dockers, macOS, emscripten) → eae87a4d9.
  • thirdparty/vcpkg/ports/openctm overlay port (Windows, rockylinux8-vcpkg incl. manylinux wheels): REF + SHA512 → eae87a4d9's archive, port-version 3 → 4 (forces a rebuild of the cached binary).
  • thirdparty/cpm/package-lock.cmake (CPM build from Add option to build third-party dependencies without submodules #6775) GIT_TAG → eae87a4d9.
  • thirdparty/licenses/manifest.json re-pinned via check_third_party_licenses.py --update-versions.

Verification (in the OpenCTM PRs)

MeshInspector/OpenCTM#2: ASan build via the public ctmLoad() on the 44-byte reproducer: overflow before, clean rejection after; a valid mesh with a file comment still round-trips.
MeshInspector/OpenCTM#3: i686 (32-bit size_t) and x86-64 builds: a RAW file declaring 0x15555556 vertices segfaulted before and is rejected with CTM_BAD_FORMAT after; a valid RAW mesh still loads on both.

Fedr and others added 7 commits September 7, 2026 22:49
Points the OpenCTM submodule and the vcpkg overlay port at the fix for a
heap-buffer-overflow write reachable from ctmLoad on a crafted .ctm file
(32-bit len+1 wrap in _ctmStreamReadSTRING). MeshInspector/OpenCTM#2.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Fedr Fedr changed the title Bump OpenCTM to security fix for _ctmStreamReadSTRING heap overflow Bump OpenCTM to the S9S disclosure fixes (string-length and count overflows) Sep 8, 2026
@Fedr
Fedr marked this pull request as ready for review September 8, 2026 09:38
@Fedr Fedr changed the title Bump OpenCTM to the S9S disclosure fixes (string-length and count overflows) Bump OpenCTM to fix heap overflows on crafted .ctm files (S9S disclosure) Sep 8, 2026
@Fedr
Fedr merged commit f75bb7d into master Sep 8, 2026
68 checks passed
@Fedr
Fedr deleted the fix/openctm-str-overflow branch September 8, 2026 10:47
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