5/27/2023

C++ Std::Condition_Variable Null Pointer Derreference


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 links


  1. Pentest Tools Find Subdomains
  2. Nsa Hack Tools
  3. Pentest Automation Tools
  4. Install Pentest Tools Ubuntu
  5. Pentest Tools Nmap
  6. Growth Hacker Tools
  7. Top Pentest Tools
  8. Hack And Tools
  9. Beginner Hacker Tools
  10. Hacker Tools Hardware
  11. Blackhat Hacker Tools
  12. Pentest Tools Website
  13. Pentest Tools Alternative
  14. Hack Tool Apk No Root
  15. Termux Hacking Tools 2019
  16. Hacker Hardware Tools
  17. Pentest Tools Linux
  18. Pentest Tools Download
  19. Hacking Tools For Windows Free Download
  20. How To Make Hacking Tools
  21. How To Make Hacking Tools
  22. Hackrf Tools
  23. Best Hacking Tools 2020
  24. Hacker Tools For Mac
  25. Hacker Tools Free
  26. Hacker Tools Apk Download
  27. Hacker Tools Apk
  28. Growth Hacker Tools
  29. Kik Hack Tools
  30. Hacker Tools
  31. New Hacker Tools
  32. Hacking Tools Free Download
  33. Hacker Tools Mac
  34. Hacking Tools Name
  35. Black Hat Hacker Tools
  36. Hacking Tools Name
  37. Pentest Tools For Mac
  38. Hacking Tools Hardware
  39. Tools For Hacker
  40. Hack Tools For Ubuntu
  41. Hackrf Tools
  42. Android Hack Tools Github
  43. Pentest Tools Website
  44. Github Hacking Tools
  45. Hacking Tools Software
  46. Kik Hack Tools
  47. Hacking Tools For Kali Linux
  48. Pentest Tools Bluekeep
  49. Pentest Tools Online
  50. Nsa Hack Tools
  51. Hacker Tools Windows
  52. Hacking Tools 2019
  53. Hack Tools Online
  54. Tools 4 Hack
  55. Pentest Tools Download
  56. Hack Apps
  57. Hack And Tools
  58. Hacking Tools Hardware
  59. Hacker
  60. How To Install Pentest Tools In Ubuntu
  61. Top Pentest Tools
  62. Tools Used For Hacking
  63. Hacker Techniques Tools And Incident Handling
  64. New Hacker Tools
  65. Pentest Tools Linux
  66. Hacker Tools Mac
  67. Hacker Tools For Windows
  68. Nsa Hacker Tools
  69. Hacking Tools Pc
  70. Hacker Tools
  71. Hacking Tools Software
  72. Pentest Tools Bluekeep
  73. Easy Hack Tools
  74. Hacking Tools 2020
  75. Pentest Tools Review
  76. Hacking Tools Download
  77. Pentest Tools Linux
  78. Pentest Recon Tools
  79. Growth Hacker Tools
  80. Pentest Tools Port Scanner
  81. Pentest Tools Download
  82. Pentest Tools Alternative
  83. Hacker Tool Kit
  84. Nsa Hack Tools
  85. Github Hacking Tools
  86. New Hack Tools
  87. Termux Hacking Tools 2019
  88. Pentest Tools Github
  89. Hacker Tools Apk
  90. Pentest Tools Apk
  91. Pentest Tools Port Scanner
  92. Hacking Tools Name
  93. Pentest Tools Kali Linux
  94. What Are Hacking Tools
  95. Hack Website Online Tool
  96. Pentest Tools Online
  97. Hack Tools For Pc
  98. Best Hacking Tools 2020
  99. Hack Tool Apk
  100. Pentest Tools For Android
  101. Blackhat Hacker Tools
  102. Hacker Tools
  103. Hacking Tools Github
  104. Pentest Tools Url Fuzzer
  105. How To Hack
  106. Hacker Tools Free Download
  107. Pentest Tools Kali Linux
  108. Ethical Hacker Tools
  109. Install Pentest Tools Ubuntu
  110. Pentest Tools For Windows
  111. Beginner Hacker Tools
  112. Hack Website Online Tool
  113. Pentest Tools Port Scanner
  114. Hacker Tools Apk
  115. Hacking Tools 2019
  116. Hacking Tools For Beginners
  117. Hacker
  118. Hacker Tools Apk Download
  119. Hacking Tools Download
  120. Hacking Tools For Windows Free Download
  121. Hacker Tools Online
  122. Hacker Techniques Tools And Incident Handling
  123. Hacker Security Tools
  124. Hacking Tools Pc
  125. Blackhat Hacker Tools
  126. Hacking Tools For Games
  127. Hacking Tools
  128. Hacker Tools Free Download
  129. How To Make Hacking Tools
  130. Pentest Tools For Mac
  131. Hack Tool Apk
  132. Pentest Tools Review
  133. Hacker Tools For Mac
  134. Hacking Tools For Beginners
  135. Hacking Tools For Kali Linux
  136. Hacking Tools Usb
  137. Hack Apps
  138. Pentest Reporting Tools

No comments:

Post a Comment