Bug 1471782 - There is an illegal address access in eval.cpp of libsass
Summary: There is an illegal address access in eval.cpp of libsass
Alias: None
Product: Fedora
Classification: Fedora
Component: sassc
Version: 27
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Aurelien Bompard
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: CVE-2017-11554, CVE-2017-11555, CVE-2017-11556, CVE-2017-11605, CVE-2017-11608, CVE-2017-12962, CVE-2017-12963, CVE-2017-12964
TreeView+ depends on / blocked
Reported: 2017-07-17 12:33 UTC by owl337
Modified: 2020-11-02 15:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-11-02 15:08:35 UTC
Type: Bug

Attachments (Terms of Use)
Triggered by "./sassc POC" (119 bytes, application/x-rar)
2017-07-17 12:33 UTC, owl337
no flags Details

Description owl337 2017-07-17 12:33:50 UTC
Created attachment 1299841 [details]
Triggered by "./sassc POC"

Description of problem:

There is an illegal address access in eval.cpp of libsass

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

<= latest version

How reproducible:

./sassc $POC

Steps to Reproduce:
The debugging information is as follows:

$ ./sassc POC

Program received signal SIGSEGV, Segmentation fault.
Sass::Eval::operator() (this=0x7fffffffde20, m=0x646820) at eval.cpp:526
526	      Expression_Ptr ex_val = m->at(key)->perform(this);
(gdb) bt
#0  Sass::Eval::operator() (this=0x7fffffffde20, m=0x646820) at eval.cpp:526
#1  0x00007ffff79ace11 in Sass::Eval::operator() (this=0x7fffffffde20, l=0x631630) at eval.cpp:491
#2  0x00007ffff79b053f in Sass::Eval::operator() (this=0x7fffffffde20, b_in=<optimized out>) at eval.cpp:721
#3  0x00007ffff79acbc3 in Sass::Eval::operator() (this=0x7fffffffde20, l=0x631080) at eval.cpp:503
#4  0x00007ffff79f2bb4 in Sass::Expand::operator() (this=<optimized out>, a=<optimized out>) at expand.cpp:330
#5  0x00007ffff7a09771 in Sass::Expand::append_block (this=0x7fffffffde10, b=<optimized out>) at expand.cpp:799
#6  0x00007ffff79e9f89 in Sass::Expand::operator() (this=0x7fffffffde10, b=0x630f10) at expand.cpp:81
#7  0x00007ffff7800358 in Sass::Context::compile (this=0x62ff40) at context.cpp:659
#8  0x00007ffff77fd303 in Sass::File_Context::parse (this=0x62ff40) at context.cpp:588
#9  0x00007ffff7b16376 in Sass::sass_parse_block (compiler=0x630480) at sass_context.cpp:227
#10 sass_compiler_parse (compiler=0x630480) at sass_context.cpp:476
#11 0x00007ffff7b15562 in sass_compile_context (c_ctx=0x62fda0, cpp_ctx=0x7ffff7fda050) at sass_context.cpp:364
#12 0x00007ffff7b1592a in sass_compile_file_context (file_ctx=0x62fda0) at sass_context.cpp:463
#13 0x0000000000402796 in compile_file (options=0x62fd20, input_path=<optimized out>, outfile=0x0) at sassc.c:145
#14 0x0000000000403117 in main (argc=<optimized out>, argv=<optimized out>) at sassc.c:335

The asan debug info is as follows:

==31154==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f1450d3b64d bp 0x7ffdff76db10 sp 0x7ffdff76d8c0 T0)
    #0 0x7f1450d3b64c  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x53664c)
    #1 0x7f1450d3a3e2  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x5353e2)
    #2 0x7f1450d3feaa  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x53aeaa)
    #3 0x7f1450d3a14e  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x53514e)
    #4 0x7f1450daba49  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x5a6a49)
    #5 0x7f1450dcf9da  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x5ca9da)
    #6 0x7f1450d9d71a  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x59871a)
    #7 0x7f1450a931aa  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x28e1aa)
    #8 0x7f1450a8e3b3  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x2893b3)
    #9 0x7f1450f9fe60  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x79ae60)
    #10 0x7f1450f9eaa1  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x799aa1)
    #11 0x7f1450f9eee1  (/home/icy/secreal/libsass-asan/install/lib/libsass.so.1+0x799ee1)
    #12 0x4ddfc5  (/home/icy/secreal/sassc-asan/install/bin/sassc+0x4ddfc5)
    #13 0x4debe5  (/home/icy/secreal/sassc-asan/install/bin/sassc+0x4debe5)
    #14 0x7f144f590a3f  (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
    #15 0x436508  (/home/icy/secreal/sassc-asan/install/bin/sassc+0x436508)

AddressSanitizer can not provide additional info.

Actual results:


Expected results:


Additional info:


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.

Comment 1 Aurelien Bompard 2017-07-18 13:24:05 UTC
Reported upstream as https://github.com/sass/libsass/issues/2446

Comment 2 Jan Kurik 2017-08-15 09:11:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 3 Ben Cotton 2018-11-27 18:30:05 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.