Crash instead of clean error parsing malformed CDL/CTF files (null derefs at CDLParser.cpp:355 and DynamicProperty.cpp:317)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 61/100
Direção de pesquisa
Comece lendo src/OpenColorIO/fileformats/cdl/CDLParser.cpp por volta da linha 355 e os dois lugares em que m_parsingInfo é atribuído (perto de :577 e :630) para ver por que um <ProcessList> vazio o deixa null. Para o segundo crash, leia DynamicProperty.cpp:317 junto com o tratamento de contêiner em CTFReaderHelper.cpp:1742-1750 que constrói um transform com uma hue curve null. Compile com ASan, execute os dois reproducers do relatório (arquivos de 56 bytes e 21 bytes) e confirme que o resultado é um erro de parsing em vez de um SEGV. Observe que os reporters já têm guard patches e ofereceram PRs, então verifique com um maintainer antes de começar.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C++
- Estrelas
- 2.1k
- Forks
- 508
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de AcademySoftwareFoundation/OpenColorIO
-
Inconsistent run-time library usage for locale handling breaks GPU code generation on some systems.Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
AcademySoftwareFoundation/OpenColorIO#2351 · 2 comentários ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Build failure on GCC/MinGW (MXE): std::ifstream constructor mismatch with Platform::filenameToUTF()Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
ReadTheDocs - OS DeprecationAbertaDocumentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
AcademySoftwareFoundation/OpenColorIO#2280 · 1 comentário ·
Todas as issues de AcademySoftwareFoundation/OpenColorIO
Issues semelhantes
-
std::fdim drops partial derivative w.r.t second argument in forward and reverse modeTalvez já em andamento @ADITYASINGH1206 assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
vgvassilev/clad#2534 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 3 dias
-
HAP.cpp fixAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
ardia-browser/ardia#1942 ·
Mantenedores costumam responder em até 1 dia