Friday, January 19, 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.

Related word

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

No comments:

Post a Comment