oss-sec mailing list archives

Re: Thoughts on Shellshock and beyond


From: "David A. Wheeler" <dwheeler () dwheeler com>
Date: Thu, 09 Oct 2014 15:00:04 -0400 (EDT)

On Thu, 9 Oct 2014 10:34:49 -0700, Tracy Reed <treed () ultraviolet org> wrote:
Sure, but at least with Haskell (and the like) you have to make it very
explicit that this is what you want to do.

Not in this case.  A Haskell implementation of the POSIX "sh" specification,
that then added function imports, could have made the same mistake
just as easily.

Educating developers will be equally hard as switching to safer languages but
at least it is something people will stomache getting started on.

I'm all for switching to safer languages where it makes sense; many
problems are completely prevented by them.  Heartbleed, for example,
would have been prevented in almost all languages *except* C and C++,
as I have already publicly noted here:
 http://www.dwheeler.com/essays/heartbleed.html#safe-language

But let's not oversell the tools.  Shellshock was the running of data
as a command in program whose *purpose* was to be a command interpreter.
A rewritten Haskell version (for example) could do it just as easily.

Also, I think you're underestimating the cost of language switching.
It is a *big* deal to switch languages in an existing code base.
Educating developers is less risky, way faster, and costs less too.

--- David A. Wheeler


Current thread: