In LibSass 3.5.5, a use-after-free vulnerability exists in the SharedPtr class in SharedPtr.cpp (or SharedPtr.hpp) that may cause a denial of service (application crash) or possibly have unspecified other impact. Upstream issue: https://github.com/sass/libsass/issues/2782
Created libsass tracking bugs for this issue: Affects: epel-7 [bug 1671396] Affects: fedora-all [bug 1671395]
Upstraem patch: https://github.com/sass/libsass/commit/67a3f4ff9b790ed016197e6da4ef4e1d4c9da09f
The use-after-free reported by ASAN is actually caused by a type confusion. In particular, function Expand::operator() in expand.cpp calls Expand::selector() which returns a Selector_List_Obj object. However, the result is assigned to a variable of type Selector_List_Ptr. This can lead to accessing invalid memory or possibly executing arbitrary code.