Closed Bug 1255081 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Graphics: Text, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Tracking Status
firefox45 --- disabled
firefox46 --- fixed
firefox47 --- fixed
firefox48 --- fixed
firefox-esr38 46+ disabled
firefox-esr45 46+ disabled

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

(4 keywords)

Attachments

(1 file)

1.62 KB, application/x-font-ttf
Details
Attached file 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
Depends on: 1255158
Fixed? in c9f2e111409ca160d3efc46daca83bb9fafab289. Please review
Verified with graphite revision c9f2e111409ca160d3efc46daca83bb9fafab289
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Group: gfx-core-security → core-security-release
Graphite2 has been updated on all affected branches including ESRs.
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.