graphite2: SEGV near NULL in [@graphite2::Slot::setAttr]

RESOLVED FIXED

Status

()

Core
Graphics: Text
--
critical
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: tsmith, Unassigned)

Tracking

(Blocks: 1 bug, 4 keywords)

unspecified
crash, csectype-nullptr, sec-low, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox45 disabled, firefox46 fixed, firefox47 fixed, firefox48 fixed, firefox-esr3846+ disabled, firefox-esr4546+ disabled)

Details

Attachments

(1 attachment)

1.62 KB, application/x-font-ttf
Details
(Reporter)

Description

2 years ago
Created attachment 8728513 [details]
test_case.ttf

This was found while fuzzing graphite2 latest revision (57107e3672c816c46e78b62bf1dff73e5ea8e118)

To reproduce run:
./gr2fonttest test_case.ttf -auto

==19941==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000050 (pc 0x7f28749ee31c bp 0x7fffb3e5f040 sp 0x7fffb3e5efe0 T0)
    #0 0x7f28749ee31b in graphite2::Slot::setAttr(graphite2::Segment*, gr_attrCode, unsigned char, short, graphite2::SlotMap const&) /home/user/code/graphite/src/Slot.cpp:290:39
    #1 0x7f287495792d in (anonymous namespace)::direct_run(bool, void* const*, unsigned char const*, int*, graphite2::Slot**&, unsigned char, graphite2::vm::Machine::status_t&, graphite2::SlotMap*) /home/user/code/graphite/src/inc/opcodes.h:386:5
    #2 0x7f287495c470 in graphite2::vm::Machine::run(void* const*, unsigned char const*, graphite2::Slot**&) /home/user/code/graphite/src/direct_machine.cpp:116:17
    #3 0x7f287497a0c2 in graphite2::vm::Machine::Code::run(graphite2::vm::Machine&, graphite2::Slot**&) const /home/user/code/graphite/src/Code.cpp:737:13
    #4 0x7f28749c88d8 in graphite2::Pass::doAction(graphite2::vm::Machine::Code const*, graphite2::Slot*&, graphite2::vm::Machine&) const /home/user/code/graphite/src/Pass.cpp:675:17
    #5 0x7f28749c88d8 in graphite2::Pass::findNDoRule(graphite2::Slot*&, graphite2::vm::Machine&, graphite2::FiniteStateMachine&) const /home/user/code/graphite/src/Pass.cpp:544
    #6 0x7f28749c6c7d in graphite2::Pass::runGraphite(graphite2::vm::Machine&, graphite2::FiniteStateMachine&, bool) const /home/user/code/graphite/src/Pass.cpp:413:13
    #7 0x7f28749e663d in graphite2::Silf::runGraphite(graphite2::Segment*, unsigned char, unsigned char, int) const /home/user/code/graphite/src/Silf.cpp:423:21
    #8 0x7f287499b779 in graphite2::Face::runGraphite(graphite2::Segment*, graphite2::Silf const*) const /home/user/code/graphite/src/Face.cpp:180:16
    #9 0x7f2874964dc2 in graphite2::Segment::runGraphite() /home/user/code/graphite/src/inc/Segment.h:97:45
    #10 0x7f2874964dc2 in (anonymous namespace)::makeAndInitialize(graphite2::Font const*, graphite2::Face const*, unsigned int, graphite2::FeatureVal const*, gr_encform, void const*, unsigned long, int) /home/user/code/graphite/src/gr_segment.cpp:46
    #11 0x7f2874964dc2 in gr_make_seg /home/user/code/graphite/src/gr_segment.cpp:105
    #12 0x4e7c69 in Parameters::testFileFont() const /home/user/code/graphite/gr2fonttest/gr2FontTest.cpp:690:20
    #13 0x4e8f7f in main /home/user/code/graphite/gr2fonttest/gr2FontTest.cpp:797:9
    #14 0x7f28745a7ec4 in __libc_start_main /build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:287
    #15 0x41a5a5 in _start (/home/user/Desktop/graphite/gr2fonttest+0x41a5a5)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/user/code/graphite/src/Slot.cpp:290:39 in graphite2::Slot::setAttr(graphite2::Segment*, gr_attrCode, unsigned char, short, graphite2::SlotMap const&)
==19941==ABORTING
(Reporter)

Updated

2 years ago
Depends on: 1255158

Comment 1

2 years ago
Fixed? in c9f2e111409ca160d3efc46daca83bb9fafab289. Please review
(Reporter)

Comment 2

2 years ago
Verified with graphite revision c9f2e111409ca160d3efc46daca83bb9fafab289
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Group: gfx-core-security → core-security-release
Graphite2 has been updated on all affected branches including ESRs.
status-firefox45: --- → wontfix
status-firefox46: --- → fixed
status-firefox47: --- → fixed
status-firefox48: --- → fixed
status-firefox-esr38: --- → fixed
status-firefox-esr45: --- → fixed
tracking-firefox-esr38: --- → 46+
tracking-firefox-esr45: --- → 46+

Updated

2 years ago
status-firefox45: wontfix → disabled

Updated

2 years ago
status-firefox-esr38: fixed → disabled
status-firefox-esr45: fixed → disabled
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.