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 news


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

沒有留言: