jeudi 1 juin 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 links


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

Aucun commentaire:

Enregistrer un commentaire