Thursday, June 1, 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 posts

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

No comments:

Post a Comment