Thursday, August 27, 2020

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 articles


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

No comments:

Post a Comment