Pages

Amazon

Sunday, 28 January 2024

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.

More articles
  1. Hacking Tools For Games
  2. Hackrf Tools
  3. How To Hack
  4. Hack Tools For Pc
  5. Hacker Security Tools
  6. Hack Tool Apk No Root
  7. Hacking Tools Github
  8. Hacking Tools Software
  9. Hacking Tools Kit
  10. Pentest Tools For Mac
  11. Hack Tools Mac
  12. Pentest Tools Find Subdomains
  13. Pentest Tools Open Source
  14. Computer Hacker
  15. Hacker Tools Free Download
  16. Hacker Hardware Tools
  17. Hacker Tools 2019
  18. How To Hack
  19. Hacker Tools Apk Download
  20. Pentest Tools Windows
  21. Pentest Tools Url Fuzzer
  22. Pentest Tools Tcp Port Scanner
  23. Hacker Techniques Tools And Incident Handling
  24. Pentest Automation Tools
  25. Pentest Tools Url Fuzzer
  26. Hacking Tools For Kali Linux
  27. Blackhat Hacker Tools
  28. Pentest Tools Bluekeep
  29. Hacker Tools For Windows
  30. Hack Tools
  31. Hacker Tools Online
  32. Hacks And Tools
  33. Hacker Tools Hardware
  34. Hacker Tools For Ios
  35. Hacking Tools Name
  36. Hacker Tools Github
  37. Pentest Reporting Tools
  38. Blackhat Hacker Tools
  39. Hackrf Tools
  40. Hacker Tools Linux
  41. Android Hack Tools Github
  42. Top Pentest Tools
  43. Pentest Tools Windows
  44. Pentest Tools For Windows
  45. Hack Tools Pc
  46. Game Hacking
  47. Hacker Tools Apk
  48. Hack Tools For Mac
  49. Hacker Tools Free
  50. Hacking App
  51. Pentest Tools List
  52. Hacking Tools For Windows Free Download
  53. Hacking Tools For Games
  54. Best Hacking Tools 2019
  55. Blackhat Hacker Tools
  56. Hack Tools Download
  57. Bluetooth Hacking Tools Kali
  58. Hacker Tools Hardware
  59. How To Install Pentest Tools In Ubuntu
  60. Hackrf Tools
  61. Pentest Tools Find Subdomains
  62. Tools For Hacker
  63. Hacker Tools Online
  64. Pentest Automation Tools
  65. Hacking Tools Windows
  66. Hacking Tools For Windows 7
  67. Pentest Reporting Tools
  68. Pentest Tools For Mac
  69. Hacker Tools
  70. How To Install Pentest Tools In Ubuntu
  71. World No 1 Hacker Software
  72. What Are Hacking Tools
  73. Pentest Tools Android
  74. Pentest Tools Windows
  75. Hackers Toolbox
  76. Hack Tools For Windows
  77. What Is Hacking Tools
  78. Best Hacking Tools 2020
  79. Hack Tools For Windows
  80. Pentest Tools For Ubuntu
  81. Hack Tools
  82. Pentest Tools Android
  83. Hacking Tools
  84. Hack Tools 2019
  85. Pentest Tools Download
  86. Pentest Tools Github
  87. Nsa Hack Tools
  88. Pentest Tools Online
  89. What Are Hacking Tools
  90. Hacking Tools Hardware
  91. Pentest Tools Website
  92. Hack Tools For Games
  93. Pentest Tools Android
  94. Hacker Tools Mac
  95. Pentest Tools For Android
  96. Hacking Tools Windows
  97. Nsa Hacker Tools
  98. Best Hacking Tools 2020
  99. Hacker Security Tools
  100. Usb Pentest Tools
  101. World No 1 Hacker Software
  102. Hackrf Tools
  103. Hacking Tools Windows 10
  104. Hacking Tools For Pc
  105. Hack Tools
  106. Hacker Tools Github
  107. Hack Tools For Games
  108. Pentest Tools Find Subdomains
  109. Hacker Tools List
  110. Easy Hack Tools
  111. Top Pentest Tools
  112. Hacker Tools Online
  113. Tools 4 Hack
  114. Hacker Hardware Tools
  115. Pentest Tools Kali Linux
  116. Pentest Tools List
  117. How To Hack
  118. Hacking Apps
  119. New Hack Tools
  120. Computer Hacker
  121. Hack Tools For Windows
  122. Hack Tools
  123. How To Hack
  124. Hack Tools
  125. Hacker Tools Apk Download
  126. Hacker Tools Online
  127. Hacking Apps
  128. Pentest Tools List
  129. Pentest Tools Download
  130. Hacker Tools Linux
  131. Hacking Tools For Windows
  132. Pentest Tools For Android
  133. Best Hacking Tools 2020
  134. Hacking Tools
  135. Hacking Tools For Pc
  136. Hacking Tools Github
  137. Pentest Tools Website
  138. What Is Hacking Tools
  139. Hack Tools For Mac
  140. Hacking App
  141. Hacking Tools For Windows
  142. Hacker Tools Free Download
  143. Pentest Tools Apk
  144. Pentest Tools For Windows
  145. Pentest Tools For Mac
  146. Nsa Hack Tools
  147. Black Hat Hacker Tools
  148. Physical Pentest Tools
  149. Hacking Tools For Kali Linux
  150. Hack Tools
  151. Android Hack Tools Github
  152. Hacker Tools Free Download
  153. Pentest Tools Review
  154. Hack Tool Apk No Root
  155. Pentest Tools Kali Linux
  156. Hack Tools Online
  157. Pentest Tools Linux
  158. Hack Tools
  159. Hack Tools For Windows
  160. Github Hacking Tools
  161. Pentest Tools For Ubuntu
  162. Hackrf Tools
  163. Pentest Tools Download
  164. Pentest Tools For Android
  165. Hacker Tools For Windows
  166. Pentest Box Tools Download
  167. Hacker Tools Free
  168. Pentest Tools Website
  169. Hack Tools Download
  170. Pentest Tools Framework
  171. Pentest Tools List