When writing software in a language such as C/C++, what tools/libraries/functions are available to help make the program more secure from exploitation on Linux?
For example: one can use
setuid() to constrain a process and drop privileges respectively. There are many other tools/libraries such as:
- Libraries: Libseccomp, Libsafe, Libcap2, Libfuzzer
- OS Controls: Linux Namespaces,
- Tools: Using stack canaries in GCC (
I realize that there are more tools such as SELinux, GrSecurity and Virtualization, but I am looking more for things that a programmer is responsible for doing vs. a sys-admin.