kernel debugger demangler add-ons fail to properly handle some symbols
|Reported by:||anevilyak||Owned by:||anevilyak|
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag.isra.25 causes issues for both the gcc3+ demangler, and the gcc2 demangler, though it should theoretically be valid for the former.
c++filt decodes this symbol as
void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.25], but our Itanium demangler  appears to fail to parse one of the function parameter types based on some preliminary investigation.
In both the kernel and the userland debugger's Demangler helper , it then attempts to fall back to the gcc2 demangler . However, this exposes a second issue: the latter, rather than failing to parse the symbol, appears to determine it to be valid, and then performs an out of bounds memory access while attempting to decode it. As this code is also used kernel-side, this potentially presents several (possibly crashing) issues.