6/05/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 info


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

No comments:

Post a Comment