Wednesday, January 24, 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 info

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

No comments:

Post a Comment