Selamat Datang

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

Tidak ada komentar:

Posting Komentar