This repository was archived by the owner on Oct 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
AddressSanitizer: heap-use-after-free src/sass_context.cpp:75 in handle_error #241
Copy link
Copy link
Open
Description
Tested commit: 43c4000
Credit: Henri Salo
Tools: american fuzzy lop 2.52b, afl-utils
Thanks to Kapsi internet-käyttäjät ry for providing valuable fuzzing resources.
sassc-2018-11-22.txt:
bod 0e
,,b,>,>,+,,E,%Ef0pkgrounH-{Oody:kg0V00:kg0000bodfbodf#{0000&}0pkgXounH-{olXr:(:00000&)}
@Xr:000000000}
=================================================================
==32534==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700000b700 at pc 0x559ff2cf98c2 bp 0x7ffe8c8f3300 sp 0x7ffe8c8f32f8
READ of size 1 at 0x60700000b700 thread T0
#0 0x559ff2cf98c1 in handle_error src/sass_context.cpp:75
#1 0x559ff2cfc65c in handle_errors src/sass_context.cpp:207
#2 0x559ff2d3f95b in sass_parse_block src/sass_context.cpp:253
#3 0x559ff2d3f95b in sass_compiler_parse src/sass_context.cpp:483
#4 0x559ff2d40a20 in sass_compile_context src/sass_context.cpp:371
#5 0x559ff2d40a20 in sass_compile_file_context src/sass_context.cpp:470
#6 0x559ff2d246b0 in compile_file /home/hsalo/src/sassc/sassc/sassc.c:158
#7 0x559ff2cff82a in main /home/hsalo/src/sassc/sassc/sassc.c:370
#8 0x7f191d31c2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#9 0x559ff2d23d49 in _start (/home/hsalo/src/sassc/sassc/bin/sassc+0x84d49)
0x60700000b700 is located 0 bytes inside of 75-byte region [0x60700000b700,0x60700000b74b)
freed by thread T0 here:
#0 0x7f191e1fda10 in free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1a10)
#1 0x559ff31581c5 in Sass::Eval::operator()(Sass::Selector_Schema*) src/eval.cpp:1585
#2 0x559ff348b282 in Sass::Selector_List::eval(Sass::Eval&) src/ast.cpp:1257
#3 0x559ff31cf178 in Sass::Expand::operator()(Sass::Ruleset*) src/expand.cpp:108
#4 0x559ff31f9340 in Sass::Expand::append_block(Sass::Block*) src/expand.cpp:802
#5 0x559ff31f9340 in Sass::Expand::operator()(Sass::Block*) src/expand.cpp:72
#6 0x559ff31d0b29 in Sass::Expand::operator()(Sass::Ruleset*) src/expand.cpp:144
#7 0x559ff31f9340 in Sass::Expand::append_block(Sass::Block*) src/expand.cpp:802
#8 0x559ff31f9340 in Sass::Expand::operator()(Sass::Block*) src/expand.cpp:72
#9 0x559ff2d79af8 in Sass::Context::compile() src/context.cpp:678
#10 0x559ff2d7ea1c in Sass::File_Context::parse() src/context.cpp:605
#11 0x559ff2d3ee11 in sass_parse_block src/sass_context.cpp:234
#12 0x559ff2d3ee11 in sass_compiler_parse src/sass_context.cpp:483
#13 0x559ff2d40a20 in sass_compile_context src/sass_context.cpp:371
#14 0x559ff2d40a20 in sass_compile_file_context src/sass_context.cpp:470
#15 0x559ff2d246b0 in compile_file /home/hsalo/src/sassc/sassc/sassc.c:158
previously allocated by thread T0 here:
#0 0x7f191e1fdd28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
#1 0x559ff2d26760 in sass_alloc_memory src/sass.cpp:36
#2 0x559ff2d267e2 in sass_copy_c_string src/sass.cpp:47
#3 0x559ff315723c in Sass::Eval::operator()(Sass::Selector_Schema*) src/eval.cpp:1565
#4 0x559ff348b282 in Sass::Selector_List::eval(Sass::Eval&) src/ast.cpp:1257
#5 0x559ff31cf178 in Sass::Expand::operator()(Sass::Ruleset*) src/expand.cpp:108
#6 0x559ff31f9340 in Sass::Expand::append_block(Sass::Block*) src/expand.cpp:802
#7 0x559ff31f9340 in Sass::Expand::operator()(Sass::Block*) src/expand.cpp:72
#8 0x559ff31d0b29 in Sass::Expand::operator()(Sass::Ruleset*) src/expand.cpp:144
#9 0x559ff31f9340 in Sass::Expand::append_block(Sass::Block*) src/expand.cpp:802
#10 0x559ff31f9340 in Sass::Expand::operator()(Sass::Block*) src/expand.cpp:72
#11 0x559ff2d79af8 in Sass::Context::compile() src/context.cpp:678
#12 0x559ff2d7ea1c in Sass::File_Context::parse() src/context.cpp:605
#13 0x559ff2d3ee11 in sass_parse_block src/sass_context.cpp:234
#14 0x559ff2d3ee11 in sass_compiler_parse src/sass_context.cpp:483
#15 0x559ff2d40a20 in sass_compile_context src/sass_context.cpp:371
#16 0x559ff2d40a20 in sass_compile_file_context src/sass_context.cpp:470
#17 0x559ff2d246b0 in compile_file /home/hsalo/src/sassc/sassc/sassc.c:158
SUMMARY: AddressSanitizer: heap-use-after-free src/sass_context.cpp:75 in handle_error
Shadow bytes around the buggy address:
0x0c0e7fff9690: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff96a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff96b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff96c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff96d0: fa fa fd fd fd fd fd fd fd fd fd fd fa fa fa fa
=>0x0c0e7fff96e0:[fd]fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd
0x0c0e7fff96f0: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
0x0c0e7fff9700: fd fd fd fd fd fd fa fa fa fa fd fd fd fd fd fd
0x0c0e7fff9710: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
0x0c0e7fff9720: fd fd fa fa fa fa fd fd fd fd fd fd fd fd fd fd
0x0c0e7fff9730: fa fa fa fa fd fd fd fd fd fd fd fd fd fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==32534==ABORTING
Metadata
Metadata
Assignees
Labels
No labels