Project: libsass (sass/libsass), language: c++
Vulnerability instance: libsass.cve-2017-12962
Sanitizer: address

================= Bug Report (1/1) ==================
## Source: Red Hat Bugzilla
## URL: https://bugzilla.redhat.com/show_bug.cgi?id=1482331
## Description:
Bugzilla ID: 1482331
Title: There is a memory leak in libsass.

Description
owl337 2017-08-17 03:14:23 UTC
Created attachment 1314521 [details]
Triggered by "./exiv2 $POC7"

Description of problem:

There is a memory leak in libsass

Version-Release number of selected component (if applicable):

<= latest version

How reproducible:

./sassc $POC

Steps to Reproduce:

The debugging information is as follows:

ASAN && GDB debugging information:

(gdb) set args bin/collAFL-output/crashes/id:000026,sig:11,src:008918,op:havoc,rep:8
(gdb) r
Starting program: /home/icy/libsass-check/sassc-asan/install/bin/sassc bin/collAFL-output/crashes/id:000026,sig:11,src:008918,op:havoc,rep:8
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Error: Code too deeply neested
        on line 1 of bin/collAFL-output/crashes/id:000026,sig:11,src:008918,op:havoc,rep:8
>>  t() )罂Θ(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
   ------------------------------------------^

=================================================================
==70213==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a0eb  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4870eb)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773693b  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46393b)
    #10 0x7ffff774f59d  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47c59d)
    #11 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #12 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #13 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #14 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #15 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #16 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #17 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #18 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #19 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #20 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #21 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #22 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #23 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #24 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #25 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #26 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #27 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #28 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #29 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)

Direct leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a0eb  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4870eb)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #20 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #21 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #22 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #29 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)

Direct leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a0eb  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4870eb)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #10 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #11 0x7ffff76cd838  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3fa838)
    #12 0x7ffff76c3c8a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3f0c8a)
    #13 0x7ffff76bd037  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3ea037)

Direct leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a0eb  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4870eb)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #20 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #21 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)
    #22 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #29 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)

Indirect leak of 192 byte(s) in 4 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff750b380  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x238380)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a5f0  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4875f0)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #20 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #21 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #22 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #29 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a5f0  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4875f0)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773693b  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46393b)
    #10 0x7ffff774f59d  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47c59d)
    #11 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #12 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #13 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #14 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #15 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #16 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #17 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #18 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #19 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #20 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #21 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #22 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #23 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #24 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #25 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #26 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #27 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #28 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #29 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775aebe  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x487ebe)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #10 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #11 0x7ffff76cd838  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3fa838)
    #12 0x7ffff76c3c8a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3f0c8a)
    #13 0x7ffff76bd037  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3ea037)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a5f0  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4875f0)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #20 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #21 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)
    #22 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #29 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775aebe  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x487ebe)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #20 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #21 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)
    #22 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #29 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775a5f0  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4875f0)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #10 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #11 0x7ffff76cd838  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3fa838)
    #12 0x7ffff76c3c8a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3f0c8a)
    #13 0x7ffff76bd037  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x3ea037)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775aebe  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x487ebe)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #9 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #10 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #11 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #12 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #13 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #14 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #15 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #16 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #17 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #18 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #19 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #20 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #21 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #22 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #23 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #24 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #25 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #26 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #27 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #28 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #29 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x4dc952  (/home/icy/libsass-check/sassc-asan/install/bin/sassc+0x4dc952)
    #1 0x7ffff775aebe  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x487ebe)
    #2 0x7ffff7750309  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47d309)
    #3 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #4 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #5 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #6 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #7 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #8 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #9 0x7ffff773693b  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46393b)
    #10 0x7ffff774f59d  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47c59d)
    #11 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #12 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #13 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #14 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #15 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #16 0x7ffff7705263  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432263)
    #17 0x7ffff77098da  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4368da)
    #18 0x7ffff77073aa  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4343aa)
    #19 0x7ffff7763696  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x490696)
    #20 0x7ffff77512b5  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47e2b5)
    #21 0x7ffff774ce7a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x479e7a)
    #22 0x7ffff774417a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x47117a)
    #23 0x7ffff77420ad  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46f0ad)
    #24 0x7ffff773fc6a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46cc6a)
    #25 0x7ffff773e42a  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x46b42a)
    #26 0x7ffff7705cf6  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x432cf6)
    #27 0x7ffff773c631  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x469631)
    #28 0x7ffff7700499  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x42d499)
    #29 0x7ffff775b3f4  (/home/icy/libsass-check/libsass-asan/install/lib/libsass.so.1+0x4883f4)

SUMMARY: AddressSanitizer: 2112 byte(s) leaked in 16 allocation(s).
[Inferior 1 (process 70213) exited with code 027]
(gdb) 


Actual results:

crash

Expected results:

crash

Additional info:

Credits:

This vulnerability is detected by team OWL337, with our custom fuzzer collAFL. Please contact ganshuitao   and chaoz.cn if you need more info about the team, the tool or the vulnerability.


Comments:
Comment 1
Fedora End Of Life 2018-02-20 15:36:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

---

Comment 2
Andreas Stieger 2018-03-09 08:48:23 UTC
From https://github.com/sass/libsass/blob/master/SECURITY.md

> If you believe you have discovered a security vulnerability,
> please report it at https://hackerone.com/libsass instead of GitHub.

Did you do that?

---

Comment 3
Icytxw 2018-03-20 06:17:28 UTC
(In reply to Andreas Stieger from comment #2)
> From https://github.com/sass/libsass/blob/master/SECURITY.md
> 
> > If you believe you have discovered a security vulnerability,
> > please report it at https://hackerone.com/libsass instead of GitHub.
> 
> Did you do that?

Sorry to be late, the latest version of libsass already fixed this issue.

---

Comment 4
shuitao gan 2018-10-28 13:06:41 UTC
@Andreas Stieger, I am the founder of team owl337, I have report it.

---

Comment 5
shuitao gan 2018-11-23 01:09:35 UTC
(In reply to Andreas Stieger from comment #2)
> From https://github.com/sass/libsass/blob/master/SECURITY.md
> 
> > If you believe you have discovered a security vulnerability,
> > please report it at https://hackerone.com/libsass instead of GitHub.
> 
> Did you do that?

The latest version of libsass has already fixed this issue.

Attachments:
Attachment 1314521: Triggered by "./exiv2 $POC7" [Link: https://bugzilla.redhat.com/attachment.cgi?id=1314521]

Build script:
#!/bin/bash -eu
# Minimized build script with only core build commands
set -eu
export BUILD='static'
make -j$(nproc)

Dockerfile:
FROM hwiwonlee/secb.base:latest
RUN apt-get update && apt-get install -y make autoconf automake libtool
RUN git clone https://github.com/sass/libsass libsass
RUN git -C libsass checkout 31573210c0d120ae56aaea543a0dbab5255cdfb7
WORKDIR $SRC/libsass
COPY build.sh $SRC/

Additional files:
filename: data_context_fuzzer.cc
content: #include "sass.h"

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  char* sass_data = (char*) malloc(sizeof(char) * size + 1);
  if (sass_data == NULL) return 0;

  memcpy(sass_data, data, size);
  sass_data[size] = '\0';

  struct Sass_Data_Context* ctx = sass_make_data_context(sass_data);
  if (ctx == NULL) {
    free(sass_data);
    return 0;
  }

  struct Sass_Options* options = sass_make_options();
  if (options == NULL) {
    sass_delete_data_context(ctx);
    return 0;
  }

  sass_option_set_output_style(options, SASS_STYLE_NESTED);
  sass_option_set_precision(options, 5);

  sass_data_context_set_options(ctx, options);
  sass_compile_data_context(ctx);

  sass_delete_data_context(ctx);
  sass_delete_options(options);

  return 0;
}