News for hackers. Stuff that matters.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by 1wd on Friday September 26, 2014 @06:37AM (#8372129)
Is it just me or would it be a good time to learn a bigger lesson from Heartbleed and Shellshock:

Minimalism is seriously a good idea. "Features" are not harmless and cost way more than you think. Providing more flexibility or functionality than absolutely necessary should really be considered and called out as defective, smelly and a bad practice.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by jameshart on Friday September 26, 2014 @10:51AM (#8372914)
Arguably an insistence on stitching together systems out of 'do one thing and one thing only' minimalist components is precisely why Shellshock is so bad, though.

That so many things delegate setting environment variables to the system shell is what allows a vulnerability like this to be so pervasive. Why does a DHCP client pass server-originated data to a full shell? In some ways, it's a form of minimalism.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by clarry on Friday September 26, 2014 @02:17PM (#8373993)
> That so many things delegate setting environment variables to the system shell

I think you've completely misunderstood the problem. The environment variable isn't and doesn't need to be set by a shell for shellshock to happen.

Why shouldn't a DHCP client pass server-originated data to a shell? Or any other program? There is nothing wrong with passing data. The only problem here is that a specific shell had a bug.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by Florin_Andrei on Friday September 26, 2014 @01:34PM (#8373761)
No, it's a form of laziness.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @12:13PM (#8373337)
In band signalling = bad
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by jingo on Friday September 26, 2014 @10:45AM (#8372886)
Send me sales people (or anyone for that matter) who want to market and sell "minimalism".

All the ones I know only want to sell "features".

Your words are absolutely 100% true, 1wd.

But I have become cynical that the world of software developers and their best customers (e.g., the ones who love "features") will never, ever follow your advice.

Personally, I prefer minimalism irrespective of the security benefits. But "engineering", a term many HN readers might attribute to their own work, like to speak of "trade-offs". All engineering involves trade-offs.

When you go without "features", sometimes you actually get something in return. What you "get" might not always be obvious. This week, it should be obvious. At least to everyone who chooses a more minimal shell without surplus features.

http://mywiki.wooledge.org/Bashism http://news.ycombinator.com/item?id=6866696p

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @09:30AM (#8372565)
The plan9 community have been bashing bash for years.

"It's got to much code, a shell should just execute shellscript not handle input"

Perhaps they'll listen now - haha as if

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by dllthomas on Friday September 26, 2014 @12:05PM (#8373285)
"It's got to much code, a shell should just execute shellscript not handle input"

Honestly, I'd sooner go the other way.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @12:12PM (#8373324)
In plan9 the two functions are totally split. rc doesn't handle any input apart from stdin, stdout and stderr.

The window manager handles input/output and sends bytes to stdout for processing. The environment is a per process filesystem in /proc/$pid/env/ .

Keeping the TTY around is a dumb move. Kill it with fire.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by dllthomas on Friday September 26, 2014 @12:23PM (#8373391)
So... not really any difference, in any sense that is remotely relevant. My point was that the shell interface is a much better UI than it is programming language.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @05:43PM (#8375066)
We totally disagree. The ad-hoc nature of unplanned and ill disciplined thrashing away at readline is a terrible interface.

Dave Presotto put it best "Linux: by amateurs, for amateurs"

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by dllthomas on Saturday September 27, 2014 @02:31AM (#8376261)
Apparently we disagree. My interaction with a readline interface in a context I understand is neither unplanned nor ill disciplined. You can throw around pejoratives, but clearly you cannot support them.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by 1wd on Friday September 26, 2014 @10:39AM (#8372852)
Maybe we need a catchy name for this "anti-pattern".
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Saturday September 27, 2014 @01:34PM (#8377621)
we do : GNU
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by Corrado on Friday September 26, 2014 @07:33AM (#8372262)
Which brings to mind the latest push for systemd as an init replacement. :/
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by lambda on Friday September 26, 2014 @07:57AM (#8372306)
One thing to recall is that much of the complexity in systemd comes from replacing a whole bunch of dodgy, special purpose code written in shell scripts (init scripts) and in the daemons it manages (daemonization code, various kinds of racy startup dependencies, etc).

Just saying "systemd is complex" is fairly sloppy thinking; the question is, is it more or less complex than re-implementing that functionality poorly and incompatibly several dozen other times in various other daemons and startup scripts?

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by vertex-four on Friday September 26, 2014 @09:20AM (#8372525)
There's significantly less complex ways to do this sort of thing, though. One that I've been looking at implementing into a distro lately is nosh[0] (and execline[1]). Every bit of code is implemented as a separate, independent utility that can be chained together through the nosh/execlineb "shell", which does no parsing and only a tiny bit of lexing.

This way, it's easy to pick and choose what features and complexity each script needs, and the features that you don't use can't affect you. Nothing is running on your system that you don't know about, and there's no complex "magic" anywhere unless you explicitly ran a command which does magic things.

[0] http://homepage.ntlworld.com/jonathan.deboynepollard/Softwar... [1] http://skarnet.org/software/execline/

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by pmahoney on Friday September 26, 2014 @11:14AM (#8373032)
Execline is a little mindbending at first, but a really nice way to write scripts for launching other programs.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by shaurz on Friday September 26, 2014 @07:54AM (#8372303)
Of course systemd theoretically allow systems to boot without any shell installed.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by zorked on Friday September 26, 2014 @08:34AM (#8372396)
You will be shocked to learn that the Linux kernel is actually much bigger :/
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by jude- on Friday September 26, 2014 @02:11PM (#8373955)
You seem to be committing Systemd Logical Fallacy #12: "The Linux kernel is complex, and you use the Linux kernel, therefore you are okay with systemd being complex too"

Full list of fallacies: http://judecnelson.blogspot.com/2014/09/systemd-biggest-fall...

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @12:12PM (#8373329)
Which, in itself, is another disaster.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by vhost- on Friday September 26, 2014 @01:53PM (#8373846)
Erm what? Can you elaborate a bit on this?
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by SixSigma on Friday September 26, 2014 @05:42PM (#8375058)
Massive kernel, loads of code.

Impossible to read and understand.

Re:Shellshock DHCP Remote Code Execution – Proof of Concept by illumen on Friday September 26, 2014 @09:02AM (#8372473)
We should put pulseaudio in the init too. That never crashes.
Re:Shellshock DHCP Remote Code Execution – Proof of Concept by fmavituna on Friday September 26, 2014 @10:20AM (#8372756)
Schneier said it best : "Complexity is the worst enemy of security"