How to turn off Glibc run-time protections?

后端 未结 3 498
一生所求
一生所求 2020-12-28 19:57

I am trying to learn about code vulnerabilities, and am testing some simple programs I wrote. However, many of the issues Glibc catches during runtime (e.g. Stack-Smashing,

3条回答
  •  时光说笑
    2020-12-28 20:54

    You should at least be able to turn off stack protection with

    -fno-stack-protector
    

    at compiletime

    Edit: sorry, have just seen that this isn't enough for you

    Doesn't seem to be easy because glibc is global for all programs, so it would be pretty bad if you could turn the protection off. My proposal would be to install an old linux distribution that has no heap protection (mid 2003 or earlier should work).

提交回复
热议问题