Skip to content

Add new project: opencascade#15337

Open
Sheri98 wants to merge 1 commit intogoogle:masterfrom
Sheri98:add-opencascade
Open

Add new project: opencascade#15337
Sheri98 wants to merge 1 commit intogoogle:masterfrom
Sheri98:add-opencascade

Conversation

@Sheri98
Copy link
Copy Markdown

@Sheri98 Sheri98 commented Apr 11, 2026

Add OpenCASCADE (OCCT) IGES parser fuzzing

Summary

  • Add libFuzzer harness for OpenCASCADE Technology (OCCT) IGES file parser
  • Targets IGESControl_Reader::ReadFile() which dispatches into the core IGES
    parsing routines (analiges.c, liriges.c, structiges.c)
  • Includes fuzzing dictionary with IGES section identifiers, entity types,
    Hollerith string prefixes, and overflow triggers
  • Includes seed corpus generator that produces 6 structurally valid IGES files
    covering minimal files, line entities, transformation matrices, multi-entity
    files, long parameter fields, and Hollerith length mismatches
  • Sanitizers: AddressSanitizer + UndefinedBehaviorSanitizer
  • Engines: libFuzzer, AFL, honggfuzz

Motivation

OpenCASCADE is a widely used open-source CAD kernel. Its IGES parser processes
untrusted input in many CAD/CAM workflows. The 80-column fixed-format IGES
specification has complex parsing logic involving Hollerith strings, section
interleaving, and fixed-width numeric fields -- all of which are historically
prone to buffer overflows and out-of-bounds reads.

Build notes

OCCT is built as static libraries with most optional modules disabled. The IGES
parser lives in TKDEIGES, which depends on TKService (requiring X11 headers).
The harness writes fuzzer input to a tmpfs file and passes the path to
IGESControl_Reader::ReadFile().

Test plan

  • python3 infra/helper.py build_image opencascade
  • python3 infra/helper.py build_fuzzers --sanitizer address opencascade
  • python3 infra/helper.py run_fuzzer opencascade occt_fuzz_iges -- -max_total_time=60
  • python3 infra/helper.py build_fuzzers --sanitizer undefined opencascade
  • python3 infra/helper.py check_build opencascade

OpenCASCADE (OCCT) is a C++ open source CAD kernel used by FreeCAD,
KiCad, LibreCAD, and many web-based CAD services. This adds a libFuzzer
harness for the IGES file format parser (src/DataExchange/TKDEIGES),
which processes untrusted geometry files.

Sanitizers: ASan + UBSan. Engines: libFuzzer, AFL, honggfuzz.
@github-actions
Copy link
Copy Markdown

Sheri98 is integrating a new project:
- Main repo: https://github.com/Open-Cascade-SAS/OCCT.git
- Criticality score: 0.49522

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