Format string vulnerability in sudo
Format string vulnerability in sudo
Posted Feb 3, 2012 19:07 UTC (Fri) by cmccabe (guest, #60281)In reply to: Format string vulnerability in sudo by josh
Parent article: Format string vulnerability in sudo
> You *definitely* don't want to look in dirname(argv[0])
> for configuration files, for several reasons: argv[0]
> need not contain a path at all, it might contain a
> user-controlled path that you don't trust, and on most
> systems the path containing the binary will never contain
> configuration files.
> for configuration files, for several reasons: argv[0]
> need not contain a path at all, it might contain a
> user-controlled path that you don't trust, and on most
> systems the path containing the binary will never contain
> configuration files.
Well, I would definitely never suggest doing this for setuid binaries, like sudo. I did it once for with scripts that I wrote and it worked out fine.
