Blog ini non-partisan dan terbuka kepada semua tanpa mengira fahaman politik. Emel atau MMS ucapan / rayuan / keluhan / pengumuman anda ke tamanperpaduan.terusblog@blogger.com untuk tulisan anda tersiar di blog ini serta merta. Gambar juga boleh disertakan dan tertakluk kepada syarat.
Posting tidak sepatutnya akan dinyahsiarkan.

Jumaat, 28 Ogos 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 info

  1. Pentest Tools
  2. Pentest Tools Kali Linux
  3. Nsa Hacker Tools
  4. Hacker Security Tools
  5. Hack Tools Download
  6. Hackers Toolbox
  7. How To Install Pentest Tools In Ubuntu
  8. Hack Tools Mac
  9. Hacking Tools Pc
  10. Hacker Tools 2019
  11. Hack Tools
  12. Pentest Tools Subdomain
  13. Hacking Tools For Pc
  14. Hacker Tools Free
  15. Hacking Tools Pc
  16. Hacker Tools For Windows
  17. Hacking Tools
  18. Hacker Search Tools
  19. Bluetooth Hacking Tools Kali
  20. Hacker Tools
  21. Hacking Tools Github
  22. Hacking Tools Hardware
  23. Pentest Tools Windows
  24. Hacker Tools Online
  25. Hacking Tools Kit
  26. Hacker Security Tools
  27. Free Pentest Tools For Windows
  28. Nsa Hacker Tools
  29. Pentest Tools Url Fuzzer
  30. Black Hat Hacker Tools
  31. Hack Rom Tools
  32. Underground Hacker Sites
  33. Hacker Tools List
  34. Hacking Tools Software
  35. Hacker Tools Free
  36. Hacker Tools Free Download
  37. Hack Tool Apk No Root
  38. Hack Tools For Windows
  39. Hacking Tools And Software
  40. Hacking Tools Mac
  41. Hack And Tools
  42. Computer Hacker
  43. Hacking Tools Kit
  44. How To Install Pentest Tools In Ubuntu
  45. Underground Hacker Sites
  46. Pentest Automation Tools
  47. Hacker Tools Free
  48. Pentest Tools Subdomain
  49. Easy Hack Tools
  50. Hacks And Tools
  51. Hacking Tools For Beginners
  52. Nsa Hack Tools
  53. Bluetooth Hacking Tools Kali
  54. Hacking Tools Download
  55. Hacker Tools 2019
  56. Pentest Tools For Ubuntu
  57. Best Hacking Tools 2020
  58. Ethical Hacker Tools
  59. Hacking Tools 2019
  60. What Are Hacking Tools
  61. Hack Tool Apk
  62. Hacking Tools Windows 10
  63. Hacker Tools List
  64. Pentest Tools Framework
  65. Hacker Tools For Windows
  66. Hacking Tools Software
  67. Pentest Tools Website Vulnerability
  68. Hacker Techniques Tools And Incident Handling
  69. Pentest Tools For Windows
  70. Hacking Tools For Windows Free Download
  71. Growth Hacker Tools
  72. Best Hacking Tools 2019
  73. Hacking Tools Windows
  74. Pentest Tools Alternative
  75. Hacking Tools Mac
  76. Hacking Tools And Software
  77. Hack Tools Github
  78. Pentest Tools Kali Linux
  79. Hacker Tools For Mac
  80. Hacking Tools Download
  81. Hacker Tools Software
  82. Pentest Tools Open Source
  83. Pentest Tools Android
  84. Physical Pentest Tools
  85. Tools Used For Hacking
  86. Hacker Tools Online
  87. Hack Tool Apk
  88. Hacking Tools 2019
  89. Underground Hacker Sites
  90. Android Hack Tools Github
  91. Hacking Tools Github
  92. Top Pentest Tools
  93. Hack Tools
  94. Hacker Tools Apk

Tiada ulasan:

Catat Ulasan