Basic HTML

Friday, January 19, 2024

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.

Continue reading


  1. Pentest Tools Bluekeep
  2. Hacking Tools Pc
  3. Github Hacking Tools
  4. Hack And Tools
  5. Hacking Tools For Beginners
  6. Hacking Tools Online
  7. Github Hacking Tools
  8. Pentest Tools Android
  9. Hacking Tools For Beginners
  10. Hacking Tools 2019
  11. Best Hacking Tools 2019
  12. Pentest Tools Framework
  13. Hacker Security Tools
  14. Pentest Tools Online
  15. Hacking Tools For Mac
  16. Hacker Tools Apk
  17. Hack Apps
  18. Beginner Hacker Tools
  19. Hack Tool Apk No Root
  20. Hacker Tools Linux
  21. Hacking Apps
  22. Hacking Tools Hardware
  23. Pentest Tools Bluekeep
  24. Hacker Security Tools
  25. Hacking Tools And Software
  26. How To Hack
  27. Usb Pentest Tools
  28. Hacking Tools 2020
  29. Hacking App
  30. Pentest Tools For Mac
  31. Hacker Tools For Mac
  32. Install Pentest Tools Ubuntu
  33. World No 1 Hacker Software
  34. Pentest Tools Website
  35. Hacking Tools Kit
  36. Pentest Tools Github
  37. Hacker Tools For Pc
  38. Pentest Recon Tools
  39. Hack Website Online Tool
  40. Pentest Tools Open Source
  41. Pentest Tools Framework
  42. Pentest Tools Nmap
  43. Usb Pentest Tools
  44. Pentest Tools Website
  45. Hacker Tools 2020
  46. Beginner Hacker Tools
  47. Pentest Tools
  48. Easy Hack Tools
  49. Hacker Tools Online
  50. Underground Hacker Sites
  51. Hacker Tools Github
  52. Pentest Tools Github
  53. Hack Tools Github
  54. Ethical Hacker Tools
  55. Hacker Tools Apk Download
  56. Hacking Tools Free Download
  57. Hacker Tools Online
  58. Hack Tools For Ubuntu
  59. Install Pentest Tools Ubuntu
  60. Hack Rom Tools
  61. Hacking Tools Pc
  62. Hack Tools 2019
  63. What Is Hacking Tools
  64. Hack App
  65. Pentest Tools Github
  66. Hack Tools Download
  67. Hack Tools Mac
  68. Hack Tools
  69. Pentest Recon Tools
  70. Pentest Tools Bluekeep
  71. Hacker Search Tools
  72. Best Hacking Tools 2019
  73. Hacking Tools For Kali Linux
  74. New Hack Tools
  75. Pentest Tools Find Subdomains
  76. Hackrf Tools
  77. Hack Tools
  78. How To Install Pentest Tools In Ubuntu
  79. Pentest Tools Subdomain
  80. Hack Tools For Ubuntu
  81. Easy Hack Tools
  82. Hack Tools For Mac
  83. Hacker Tools Mac
  84. Black Hat Hacker Tools
  85. Hacking Tools 2019
  86. Pentest Tools For Ubuntu
  87. How To Make Hacking Tools
  88. Hacking Tools Kit
  89. Hacking Tools For Windows
  90. Hack App

No comments:

Post a Comment