Monday, August 24, 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.

Related links

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

No comments:

Post a Comment