Saturday, May 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.

More information


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

No comments:

Post a Comment