This story is about a bug generated by g++ and clang compilers (at least)
The condition_variables is a feature on the standard library of c++ (libstdc++), when its compiled statically a weird asm code is generated.


Any example on the link below will crash if its compiled statically:
 https://en.cppreference.com/w/cpp/thread/condition_variable



In this case the condition_variable.wait() crashed, but this happens with other methods, a simple way to trigger it:




If this program is compiled dynamically the crash doesn't occur:

Looking the dissasembly there is a surprise created by the compiler:


Compilers:
    g++  9.2.1+20200130-2
    clang++ v9

Both compilers are generating the "call 0x00"

If we check this call in a dynamic compiled:




The implementation of condition_variable in github:
https://github.com/gcc-mirror/gcc/blob/b7c9bd36eaacac42631b882dc67a6f0db94de21c/libstdc%2B%2B-v3/include/std/condition_variable


The compilers can't copile well this code in static,  and same happens on  other condition_variable methods.
I would say the _lock is being assembled improperly in static, is not exacly a null pointer derreference but the effects are the same, executing code at address 0x00 which on linux is a crash on most of cases.

Related posts
  1. Hack App
  2. How To Hack
  3. Hacking Tools Usb
  4. Best Hacking Tools 2019
  5. Beginner Hacker Tools
  6. Hacker Tools Software
  7. Easy Hack Tools
  8. Growth Hacker Tools
  9. Hacker Tools For Mac
  10. How To Hack
  11. Hacking Tools Name
  12. Termux Hacking Tools 2019
  13. Hacking Tools And Software
  14. New Hacker Tools
  15. Pentest Tools For Windows
  16. How To Hack
  17. Ethical Hacker Tools
  18. Pentest Tools Review
  19. Hacker Tools 2020
  20. Hacking Tools Pc
  21. Hack And Tools
  22. Hacking Tools Windows 10
  23. Hacking Tools Usb
  24. Pentest Tools Framework
  25. Blackhat Hacker Tools
  26. Hacking Tools For Kali Linux
  27. Hacker Tools Windows
  28. Pentest Tools Online
  29. Best Pentesting Tools 2018
  30. Pentest Tools Nmap
  31. Hack Tools For Pc
  32. Hacking App
  33. Hacking Tools Pc
  34. Tools For Hacker
  35. Pentest Tools Subdomain
  36. Tools 4 Hack
  37. What Are Hacking Tools
  38. Hacker Hardware Tools
  39. Pentest Tools Android
  40. What Are Hacking Tools
  41. Tools Used For Hacking
  42. Hacking Tools 2019
  43. Pentest Tools Windows
  44. Hacking Tools For Mac
  45. Hacker Tools 2020
  46. Hacking App
  47. Pentest Tools Url Fuzzer
  48. Nsa Hack Tools
  49. Pentest Tools
  50. Hack Tools
  51. Hack Apps
  52. Hackrf Tools
  53. Hacker Tool Kit
  54. What Are Hacking Tools
  55. Pentest Tools Free
  56. What Are Hacking Tools
  57. Hack App

0 comments:

Post a Comment