-
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: heap-use-after-free in both libsass 3.5.5 and latest codebase #2782
Comments
A simple repro: x {
@extend #{&};
@extend #{&};
} Interestengly, the various versions of Sass can't agree on the right result: With the example as above, Dart outputs nothing. Ruby outputs:
However, if we change this to: x {
@extend #{&};
@extend #{&};
color: red;
} Dart: x {
color: red;
} Ruby: x {
color: red; } /cc @nex3 |
Selector stack got popped during eval, resulting in `extender` deletion.
@glebm Dart Sass is correct here. As of sass/sass#2250, the expected behavior for an I believe |
Assigned CVE-2018-19827 |
Selector stack got popped during eval, resulting in `extender` deletion.
I found a new heap use-after-free bug with a special sass file. The file causes heap-use-after-free bug in both version 3.5.5 and the latest master branch (accessed on 2018/12/2) codebase, though with slightly different crash stacks. (And is quite different from previous issue #2643 .)
Build libsass/saasc with ASan:
CXX=clang++ CC=clang CFLAGS="-g -fsanitize=address -fno-omit-frame-pointer" CXXFLAGS=$CFLAGS make -C sassc -j4
Run
./sassc sass_heap_UAF
(sass_heap_UAF is at here: https://github.com/zyingp/temp/blob/master/sass_heap_UAF)
The program crashes.
ASan Crash stack
Crash in the latest code (accessed on 2018/12/2)
Crash in libsass 3.5.5
The text was updated successfully, but these errors were encountered: