-
Notifications
You must be signed in to change notification settings - Fork 464
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
AddressSanitizer: null pointer dereference (SEGV) in Sass::Functions::selector_append (libsass/src/functions.cpp:2088:13) #2663
Comments
Thanks for the report. |
@xzyfer thanks a lot for the great support, do you have the patch of the common root cause issue? |
There are two separate issues here: First, the div {
a: selector-append('.menu', 'li', '&');
} I've sent a fix for this in #2760. Second is this issue: div {
a: selector-append('.x~~', 'li', 'a')
} dart-sass output:
ruby-sass output:
sassc output:
I've sent #2762 for this one but not sure if it's the best solution. |
Now correctly errors on inputs such as this one (see sass#2663): div { a: selector-append('.menu', 'li', '&'); }
Now correctly errors on inputs such as this one (see sass#2663): div { a: selector-append('.menu', 'li', '&'); }
Now correctly errors on inputs such as this one instead of crashing (see #2663): ```scss div { a: selector-append('.menu', 'li', '&'); } ``` ``` Error: Parent selectors aren't allowed here. on line 3:37 of ../../../tmp/test.scss, in function `selector-append` from line 3:6 of ../../../tmp/test.scss >> e: selector-append('.menu', 'li', '&'); ------------------------------------^ ```
Hey there, I have discovered a null pointer dereference in libsass at: functions.cpp:2088:13
Found when fuzzing commit 60f8391 of libsass, using commit aa6d5c6 of sassc as a harness.
Compile flags to reproduce:
System information:
This bug was found to be in libsass releases from 3.3.6 until the commit listed above.
You can find a collection of PoC files that trigger the bug here.
The full ASAN report is shown below:
The text was updated successfully, but these errors were encountered: