Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap-buffer-overflow (READ of size 1) in lexer.hpp #243

Open
geeknik opened this issue Dec 3, 2018 · 1 comment
Open

heap-buffer-overflow (READ of size 1) in lexer.hpp #243

geeknik opened this issue Dec 3, 2018 · 1 comment

Comments

@geeknik
Copy link

geeknik commented Dec 3, 2018

tested commit ceef4cd, compiled with clang 8 and address sanitizer.

echo "J1w=" | base64 -d | ./sassc

==4583==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000013 at pc 0x0000007e5778 bp 0x7fffac5c5af0 sp 0x7fffac5c5ae8
READ of size 1 at 0x602000000013 thread T0
    #0 0x7e5777 in char const* Sass::Prelexer::exactly<(char)92>(char const*) /root/libsass/src/lexer.hpp:93:14
    #1 0x7e5777 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)92>(char const*)), &Sass::Prelexer::re_linebreak>(char const*) /root/libsass/src/lexer.hpp:227
    #2 0x7e5777 in char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)92>(char const*)), &Sass::Prelexer::re_linebreak>(char const*)), &Sass::Prelexer::escape_seq, &Sass::Prelexer::unicode_seq, &Sass::Prelexer::interpolant, &(char const* Sass::Prelexer::any_char_but<(char)39>(char const*))>(char const*) /root/libsass/src/lexer.hpp:211
    #3 0x7e5777 in char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)92>(char const*)), &Sass::Prelexer::re_linebreak>(char const*)), &Sass::Prelexer::escape_seq, &Sass::Prelexer::unicode_seq, &Sass::Prelexer::interpolant, &(char const* Sass::Prelexer::any_char_but<(char)39>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:245
    #4 0x7e5777 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)92>(char const*)), &Sass::Prelexer::re_linebreak>(char const*)), &Sass::Prelexer::escape_seq, &Sass::Prelexer::unicode_seq, &Sass::Prelexer::interpolant, &(char const* Sass::Prelexer::any_char_but<(char)39>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)39>(char const*))>(char const*) /root/libsass/src/lexer.hpp:227
    #5 0x7e5777 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)39>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)92>(char const*)), &Sass::Prelexer::re_linebreak>(char const*)), &Sass::Prelexer::escape_seq, &Sass::Prelexer::unicode_seq, &Sass::Prelexer::interpolant, &(char const* Sass::Prelexer::any_char_but<(char)39>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)39>(char const*))>(char const*) /root/libsass/src/lexer.hpp:228
    #6 0x7e5777 in Sass::Prelexer::single_quoted_string(char const*) /root/libsass/src/prelexer.cpp:513
    #7 0x7e5777 in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::single_quoted_string, &Sass::Prelexer::double_quoted_string>(char const*) /root/libsass/src/lexer.hpp:211
    #8 0x7fcd2d in Sass::Prelexer::quoted_string(char const*) /root/libsass/src/prelexer.cpp:561:14
    #9 0x7fcd2d in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*) /root/libsass/src/lexer.hpp:211
    #10 0x7fcd2d in char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*) /root/libsass/src/lexer.hpp:212
    #11 0x7fcd2d in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*) /root/libsass/src/lexer.hpp:212
    #12 0x7fcd2d in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*) /root/libsass/src/lexer.hpp:221
    #13 0x7fcd2d in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*) /root/libsass/src/lexer.hpp:228
    #14 0x7fc947 in char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:253:23
    #15 0x7fc947 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:227
    #16 0x7fc947 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:228
    #17 0x7fc947 in char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::namespace_schema>(char const*)), &(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:228
    #18 0x7fc0f6 in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::line_comment, &Sass::Prelexer::schema_reference_combinator, &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_lookahead_ops>(char const*)), &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_combinator_ops>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)40>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::optional<&Sass::Prelexer::re_selector_list>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::exactly<(char)41>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::exact_match, &Sass::Prelexer::class_match, &Sass::Prelexer::dash_match, &Sass::Prelexer::prefix_match, &Sass::Prelexer::suffix_match, &Sass::Prelexer::substring_match>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::namespace_schema>(char const*)), &(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:212:14
    #19 0x7fc0f6 in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::block_comment, &Sass::Prelexer::line_comment, &Sass::Prelexer::schema_reference_combinator, &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_lookahead_ops>(char const*)), &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_combinator_ops>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)40>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::optional<&Sass::Prelexer::re_selector_list>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::exactly<(char)41>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::exact_match, &Sass::Prelexer::class_match, &Sass::Prelexer::dash_match, &Sass::Prelexer::prefix_match, &Sass::Prelexer::suffix_match, &Sass::Prelexer::substring_match>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::namespace_schema>(char const*)), &(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:212
    #20 0x7fc0f6 in char const* Sass::Prelexer::alternatives<&Sass::Prelexer::spaces, &Sass::Prelexer::block_comment, &Sass::Prelexer::line_comment, &Sass::Prelexer::schema_reference_combinator, &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_lookahead_ops>(char const*)), &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_combinator_ops>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)40>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::optional<&Sass::Prelexer::re_selector_list>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::exactly<(char)41>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::exact_match, &Sass::Prelexer::class_match, &Sass::Prelexer::dash_match, &Sass::Prelexer::prefix_match, &Sass::Prelexer::suffix_match, &Sass::Prelexer::substring_match>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::namespace_schema>(char const*)), &(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:212
    #21 0x7fc0f6 in char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::spaces, &Sass::Prelexer::block_comment, &Sass::Prelexer::line_comment, &Sass::Prelexer::schema_reference_combinator, &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_lookahead_ops>(char const*)), &(char const* Sass::Prelexer::class_char<&Sass::Constants::selector_combinator_ops>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)40>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::optional<&Sass::Prelexer::re_selector_list>(char const*)), &Sass::Prelexer::optional_spaces, &(char const* Sass::Prelexer::exactly<(char)41>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::exact_match, &Sass::Prelexer::class_match, &Sass::Prelexer::dash_match, &Sass::Prelexer::prefix_match, &Sass::Prelexer::suffix_match, &Sass::Prelexer::substring_match>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::namespace_schema>(char const*)), &(char const* Sass::Prelexer::alternatives<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)35>(char const*)), &(char const* Sass::Prelexer::negate<&(char const* Sass::Prelexer::exactly<(char)123>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::exactly<(char)46>(char const*)), &(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::optional<&Sass::Prelexer::pseudo_prefix>(char const*)), &(char const* Sass::Prelexer::negate<&Sass::Prelexer::uri_prefix>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::one_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::sequence<&(char const* Sass::Prelexer::exactly<(char)45>(char const*)), &Sass::Prelexer::optional_spaces>(char const*))>(char const*)), &(char const* Sass::Prelexer::alternatives<&Sass::Prelexer::kwd_optional, &(char const* Sass::Prelexer::exactly<(char)42>(char const*)), &Sass::Prelexer::quoted_string, &Sass::Prelexer::interpolant, &Sass::Prelexer::identifier, &Sass::Prelexer::variable, &Sass::Prelexer::percentage, &Sass::Prelexer::binomial, &Sass::Prelexer::dimension, &Sass::Prelexer::alnum>(char const*))>(char const*))>(char const*)), &(char const* Sass::Prelexer::zero_plus<&(char const* Sass::Prelexer::exactly<(char)45>(char const*))>(char const*))>(char const*))>(char const*))>(char const*) /root/libsass/src/lexer.hpp:253
    #22 0x70119e in char const* Sass::Parser::peek<&Sass::Prelexer::re_selector_list>(char const*) /root/libsass/src/parser.hpp:137:27
    #23 0x70119e in Sass::Parser::lookahead_for_selector(char const*) /root/libsass/src/parser.cpp:2806
    #24 0x6da1e9 in Sass::Parser::parse_block_node(bool) /root/libsass/src/parser.cpp:274:28
    #25 0x6d1e0b in Sass::Parser::parse_block_nodes(bool) /root/libsass/src/parser.cpp:196:11
    #26 0x6cdf49 in Sass::Parser::parse() /root/libsass/src/parser.cpp:122:5
    #27 0x5795b1 in Sass::Context::register_resource(Sass::Include const&, Sass::Resource const&) /root/libsass/src/context.cpp:332:24
    #28 0x58fc4c in Sass::Data_Context::parse() /root/libsass/src/context.cpp:644:5
    #29 0x53eacc in Sass::sass_parse_block(Sass_Compiler*) /root/libsass/src/sass_context.cpp:234:31
    #30 0x53eacc in sass_compiler_parse /root/libsass/src/sass_context.cpp:483
    #31 0x53dd88 in sass_compile_context(Sass_Context*, Sass::Context*) /root/libsass/src/sass_context.cpp:371:7
    #32 0x53dbbe in sass_compile_data_context /root/libsass/src/sass_context.cpp:456:12
    #33 0x532c67 in compile_stdin /root/sassc/sassc.c:138:5
    #34 0x5339a2 in main /root/sassc/sassc.c:377:18
    #35 0x7f7c3dee62e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #36 0x45b209 in _start (/root/sassc/bin/sassc+0x45b209)

0x602000000013 is located 0 bytes to the right of 3-byte region [0x602000000010,0x602000000013)
allocated by thread T0 here:
    #0 0x503dd2 in realloc /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:165:3
    #1 0x532b9b in compile_stdin /root/sassc/sassc.c:112:25
    #2 0x5339a2 in main /root/sassc/sassc.c:377:18
    #3 0x7f7c3dee62e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: heap-buffer-overflow /root/libsass/src/lexer.hpp:93:14 in char const* Sass::Prelexer::exactly<(char)92>(char const*)

@fgeek
Copy link

fgeek commented Feb 2, 2019

Reproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants