////

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 Reporting Tools
  2. Hacking Tools Windows
  3. Hacker Tools Free
  4. Pentest Automation Tools
  5. Hacking Tools Kit
  6. Hacker Hardware Tools
  7. Hacker Security Tools
  8. Hack Tools 2019
  9. Hack Tools For Ubuntu
  10. Hacker Tools Linux
  11. Hacker Tools 2020
  12. Hacker Tool Kit
  13. Tools 4 Hack
  14. Pentest Tools Url Fuzzer
  15. Hacking Tools Usb
  16. Hacking Tools Usb
  17. How To Install Pentest Tools In Ubuntu
  18. Hacking Tools Mac
  19. Hacker Techniques Tools And Incident Handling
  20. Pentest Tools Android
  21. Pentest Tools Open Source
  22. Nsa Hack Tools Download
  23. Hack Tools For Mac
  24. Github Hacking Tools
  25. Hackers Toolbox
  26. Pentest Tools Bluekeep
  27. New Hack Tools
  28. Nsa Hacker Tools
  29. Hacker Tools 2019
  30. Termux Hacking Tools 2019
  31. Hacking Apps
  32. Hacker Tools 2020
  33. Hack Tools For Ubuntu
  34. Hack Tools For Mac
  35. Hacker Tools Free Download
  36. Tools 4 Hack
  37. Hack Tools Mac
  38. Hacking Tools Free Download
  39. Hacking Tools
  40. Pentest Automation Tools
  41. Hackrf Tools
  42. Hack Tool Apk
  43. Hack Tools 2019
  44. Usb Pentest Tools
  45. Ethical Hacker Tools
  46. Hacking Apps
  47. Hacker Tools Linux
  48. Hack Tools For Pc
  49. Hacker Techniques Tools And Incident Handling
  50. Hacking Tools Software
  51. Pentest Tools Find Subdomains
  52. Hack Tools For Pc
  53. Nsa Hack Tools Download
  54. Hack Tools For Games
  55. Hacker Tools Free Download
  56. Pentest Tools Url Fuzzer
  57. Hack Tool Apk
  58. Best Hacking Tools 2019
  59. Pentest Tools Apk
  60. Hacking Tools Windows 10
  61. Hacking Tools Usb
  62. Hacker Tools Hardware
  63. Pentest Tools Subdomain
  64. Pentest Tools Port Scanner
  65. Hacker Search Tools
  66. Game Hacking
  67. Hacker Tools Apk
  68. Hacking Tools Usb
  69. Hacking Tools Online
  70. Pentest Tools Apk
  71. Pentest Tools Subdomain
  72. Hacking Tools 2020
  73. Kik Hack Tools
  74. Hacker Tools 2019

0 Reactions to this post

Add Comment

    Post a Comment