Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm working on an application that will need to be setuid root. As my first setuid-root project, I'm extremely nervous about security. I know that the most common attack on an executable is a buffer overrun, or letting them shove more into an array that fits.
My application is entirely non-interactive, the only user input coming from command line arguments. So my question is, does C and/or C++ set up argc and argv securely? Is it safe to assume that CLI args are not a threat? That is, is their creation not a threat, I realize I must still carefully validate their input.
You could compile it with Stack Smashing and Buffer overflow protection i guess, but i don't know how.
You should take a look at some of OpenBSD's projects, they are extremely good at coding securely.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.