Crash instead of clean error parsing malformed CDL/CTF files (null derefs at CDLParser.cpp:355 and DynamicProperty.cpp:317)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 61/100
Rechercherichtung
Beginne damit, src/OpenColorIO/fileformats/cdl/CDLParser.cpp um Zeile 355 und die beiden Stellen zu lesen, an denen m_parsingInfo zugewiesen wird (nahe :577 und :630), um zu sehen, warum ein leeres <ProcessList> es null lässt. Für den zweiten Absturz lies DynamicProperty.cpp:317 zusammen mit der Container-Behandlung in CTFReaderHelper.cpp:1742-1750, die einen Transform mit einer null Hue-Curve baut. Baue mit ASan, führe beide Reproduzierer aus dem Bericht aus (56-Byte- und 21-Byte-Dateien) und bestätige, dass das Ergebnis ein Parse-Fehler und kein SEGV ist. Beachte, dass die Reporter bereits Guard-Patches haben und PRs angeboten haben, also sprich vor dem Anfang mit einem Maintainer.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Fuzzing the file-reading paths of current master (22dd9c4, 2026-09-30)
found two null-pointer dereferences where malformed color files crash the
process instead of producing a clean parse error. Per SECURITY.md
("reading malformed data should produce an error, not a crash") these are
filed as bugs. Both are deterministic (5/5 each under ASan), no memory
corruption observed. We have two-line guard patches for both and are happy
to send PRs.
1. CDLParser::validateParsing dereferences null parsing info
Site: src/OpenColorIO/fileformats/cdl/CDLParser.cpp:355
const CDLTransformVec& pTransformList = getCDLParsingInfo()->m_transforms;
m_parsingInfo is only populated when CDL/CCC container elements are
parsed (CDLParser.cpp:577/:630). A <ProcessList> document whose body
never contains such an element leaves the info RcPtr null, and the line
above dereferences it. Minimal reproducer (56 bytes):
<ProcessList>
</ProcessList>
ASan: SEGV in CDLParser::Impl::validateParsing() const
(CDLParser.cpp:356), 5/5 deterministic; a valid CDL seed parses clean.
Suggested fix: null-check the parsing info and throw the standard parse
error instead.
2. Grading hue-curve dynamic property validates a null curve
Site: src/OpenColorIO/DynamicProperty.cpp:317
void DynamicPropertyGradingHueCurveImpl::setValue(const ConstGradingHueCurveRcPtr & value)
{
value->validate();
With malformed input, the reader's grading path builds a transform whose
hue curve is a null ConstGradingHueCurveRcPtr (container handling around
CTFReaderHelper.cpp:1742-1750), and setValue calls validate() on it.
Minimal reproducer (21 bytes):
<ColorDecisionListn/>
(the typo'd root element is intentional; matching is by content, so the
file needs no particular extension). ASan: SEGV in
DynamicPropertyGradingHueCurveImpl::setValue, 5/5 deterministic.
Suggested fix: guard if (!value) throw ... or skip creating the dynamic
property when the curve is null.
Notes
- Harness: parse-only driver over the file-format read path
(GetCachedFileAndFormat), ASan + libFuzzer, no GPU/codegen. - Both PoCs are complete files, deterministic across 5 runs each; the
56-byte and 21-byte contents above are the whole reproducers. - CWE-476, availability only; no corruption observed.
- Found by our own fuzzing harness; analysis was AI-assisted.
- Vorherrschende Sprache
- C++
- Sterne
- 2.1k
- Forks
- 508
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus AcademySoftwareFoundation/OpenColorIO
-
Inconsistent run-time library usage for locale handling breaks GPU code generation on some systems.Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
AcademySoftwareFoundation/OpenColorIO#2351 · 2 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Build failure on GCC/MinGW (MXE): std::ifstream constructor mismatch with Platform::filenameToUTF()Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
AcademySoftwareFoundation/OpenColorIO#2280 · 1 Kommentar ·
Alle Issues in AcademySoftwareFoundation/OpenColorIO
Ähnliche Issues
-
std::fdim drops partial derivative w.r.t second argument in forward and reverse modeEvtl. vergeben @ADITYASINGH1206 hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
vgvassilev/clad#2534 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 3 Tagen
-
HAP.cpp fixOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ardia-browser/ardia#1942 ·
Maintainer antworten meist innerhalb von 1 Tag