Comment by ptx
5 days ago
> BTW, this is not something Linux specific. Unfortunately it is a trait inherited from the UNIX ancestry by almost all operating systems, including all BSD variants [...] Hmm... Strange... There is nothing to quote from this manual about warnings, issues or sanitization...
This is not a problem on FreeBSD, if the problem is (as the article seems to say) that the documentation fails to warn about the requirement to properly encode arguments passed to the shell.
Here's the FreeBSD man page [1] for system(3):
SECURITY CONSIDERATIONS
The system() function is easily misused in a manner that enables a
malicious user to run arbitrary command, because all meta-characters
supported by sh(1) would be honored. User supplied parameters should
always be carefully santized before they appear in string.
[1] https://man.freebsd.org/cgi/man.cgi?query=system&sektion=3&m...
No comments yet
Contribute on Hacker News ↗