I reproduced it with dnsmasq as well; just set up a server with the following options. eth2 is the network adapter that I was using for the test network, and I picked the 10.0.10.0/24 prefix for this particular network.
Then on the target system (an Ubuntu system using ifupdown for configuration), I just configured eth0 for dhcp:
iface eth0 inet dhcp
and ran:
sudo ifdown eth0 && sudo ifup eth0
Unlike some of the other exploits, this one affects Debian and Ubuntu. Debian and Ubuntu use dash as /bin/sh, so many things that just use /bin/sh (such as the system() function, lots of shell scripts, etc) aren't affected like they are on other Linux distros.
But dhclient calls dhclient-script to execute various hook scripts, and dhclient-script uses #!/bin/bash and is thus vulnerable.
On my particular Debian system, it doesn't look like NetworkManager based DHCP is affected, as it doesn't call the dhclient-script. It does call various scripts in /etc/network/if-*.d/, but none of the ones that I have installed use bash, they all use sh. However, if I deliberately put a bash script in there, and attach it to the network with the rogue DHCP server, it does get passed the bad environment variable (though on my Debian system I've already updated Bash so I just get the error message rather than the exploit).
So yeah, there are a a lot of ways for a stray Bash script to cause problems here.
Did you try if you can do something else beside the echo on Ubuntu? dhclient runs under an AppArmor profile which tries to keep it in a pretty short leash.
No, I didn't try that, but we happen to be running a custom kernel that doesn't include AppArmor support, as we needed to pull in a newer upstream kernel version. Given this issue, we should probably revisit that decision.
Yes, you are still vulnerable. I happen to be on Mountain Lion instead of Mavericks, but you can easily check yourself.
$ /bin/sh --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)
Copyright (C) 2007 Free Software Foundation, Inc.
As long as you have a /bin/sh or /bin/bash that is of a vulnerable version, then any shell script which begins with #!/bin/sh or #!/bin/bash, and is executed in an environment that could have environment variables set by an attacker, could leave you vulnerable.
Installing a version via homebrew and setting it up in /etc/shells doesn't help. What you need to do is replace /bin/sh and /bin/bash. I don't know what effects this will have; it will likely work fine, but if you were to try it, I'd recommend backing up the old buggy versions first, so you could replace them if something went wrong. I'd recommend replacing them with a version as close as possible to what you were replacing, with just the one patch applied, as there may be scripts which behave subtly differently in Bash 4 vs Bash 3 that ships with OS X.
No, you are not OK. Replace "sh" in that command with "bash" and you should still see the issue.
There is a lower likelihood that you'll see the issue, as anything which just uses sh (including the "system" function, and similar ones) will use dash indeed of Bash; but there will still be places where bash is called explicitly, including many shell scripts that depend on bash features, which are vulnerable.
The fact that under a first-sale model, there are business models that are able to handle selling this kind of long-tail content perfectly well, despite the higher up-front costs for printing up a batch of disks. But since streaming allows them to sell exclusively, which allows them to strike nice deals that look good up front but then wind up squeezing everyone in the industry and being crap for consumers, they wonder why revenues are declining and they can't sell anything, but never actually have the guts to go back to a model that worked but gives them less negotiation leverage with their vendors.
> I am trying to see the difference between this and believing that it's OK to steal a car because the manufacturer hasn't made it "affordable enough" for you.
Really? A car has fixed, very high costs per item. Downloading from a streaming site has zero costs for the studio. Yes, the content originally cost money to produce, but it makes absolutely no difference to them whether I watch it on a streaming site or spend the night at the local pub instead.
What they're doing is more akin to someone having an open air concert that costs $50 bucks to get in and you have to go through a metal detector and pat down to ensure you don't bring in any recording devices, and then trying to complain that some people just listen to the concert from outside the fence.
Really? A car has fixed, very high costs per item. Downloading from a streaming site has zero costs for the studio.
Simply not true. The marginal cost of a streaming download are near zero. the fixed costs of making a film available for streaming are non-trivial. Also, the costs fall on producers many of whom work outside studios.
Do you think all this stuff just takes care of itself? It doesn't. Going from a completed cut that's good enough to screen at a festival to a streaming deliverable in a great deal of work, and QCing it all is extremely time-consuming. It involves weeks of work for multiple specialists. Measuring compliance can be automated to a certain extent. Repairing defects cannot. The standards are the same for the latest blockbuster and for your little low-budget feature or that cool out-of-print classic cult film you managed to acquire the rights to. If you're lucky and planned it all out in advance, you might spend only $10,000.
Excuse me if I've got a bee in my bonnet about this, but this stuff is what I do for a living a lot of people seem to think that getting a film onto a streaming service is just a matter of a quick transcode and an FTP PUT. It's actually a ton of highly skilled work.
I'm not arguing that there are no costs to delivering streaming content. What I'm arguing is that there are no per-stream costs to the studio, Netflix, or anyone else (other than the hosting site) for someone who watches a stream on a pirate streaming site, so it's not really comparable to stealing a car. It still may be unethical, but it's definitely a different ethical category than stealing something which has a per-unit cost; actually depriving someone of a valuable object that they posses is different enough that the analogy doesn't work.
If one person can rip a DVD or bluray and put it on Piratebay for others in an hour or two, then there's a perfectly acceptable free alternative.
Weeks of work for specialists really sounds over the top, as I doubt that anyone can tell the difference between a competent pirate version and a specially produced Netflix copy.
It's pretty obvious that the main thing prohibiting streaming / download releases are licensing and other legal requirements.
Because if it isn't done properly it won't play back properly, and when something doesn't play back properly the blame usually falls on the distributor, whether they're a broadcaster, streaming provider, or DVD wholesaler. The only reason the 'competent pirate version' can exist is because someone else laid the groundwork for it.
Weeks of work for specialists really sounds over the top
That attitude is why first time producers almost invariably run out of money in post-production. Every film is different and has to be QC'ed individually, and if there are problems they'll have to be addressed individually. Broadcast and streaming standards are pretty stringent and if something doesn't pass then no payments are made.
I still don't see why this entitles consumers to the content on their own terms.
>Really? A car has fixed, very high costs per item. Downloading from a streaming site has zero costs for the studio...
Well, my question was from a moral standpoint. Why is it morally different from stealing a car?
Still, it's interesting to see the responses. Some, including the comment at which my original reply was aimed) say it doesn't matter what the producers' expenses are. It's their problem.
But, here you've gone to lengths to explore the economic mechanics irrespective of the moral question. The thing is that even if your economic analysis is perfect, it still avoids the question: what in any of this gives the consumer the right to wholly disregard the producer's economic considerations, analyze them to determine whether the producer is entitled to payment, or otherwise do anything other than decide whether to obtain the product by buying it or doing without?
>...then trying to complain that some people just listen to the concert from outside the fence.
But, if the people outside the fence were trespassing or were otherwise informed that they should buy a ticket, then the complaints would be no less valid.
No, the study covered three sweeteners in mice. From the original study (paywalled, accessed via my university):
> To determine the effects of NAS on glucose homeostasis, we added commercial formulations of saccharin, sucralose or aspartame to the drinking water of lean 10-week-old C57Bl/6 mice
They found effects from all three sweeteners, though the strongest effects were from saccharin.
The followup study confirming the effects on humans, which was a much smaller study, only involved saccharin.
Every day, I have QA, tech support, my boss, and other developers tell me something that is not actually true, or simply omits any of the relevant information necessary to fix the problem. This is something you live with on a daily basis in a technical job involving complex systems that not everyone understands the entirety of.
If you can't solve a problem with only some information, and some of it incorrect, then how are you supposed to be able to help?
You are looking at this like it is a single-variable problem. This "test" should be easily solvable by a candidate. It is also a very bad one if it involves lying to the candidate. These two factors are not mutually exclusive.
Note that this isn't an "incredibly serious system level issue." This is an issue with a browser that Google hasn't supported for several years, since they replaced it with Chrome. It also doesn't affect alternative browsers like Firefox or Opera.
Note that if Apple had a similar vulnerability, you likely couldn't work around it by using an alternative browser, because all browsers are required to use Safari's rendering engine.
Chrome has made some strides this year, but the Android Browser still leads by a point. That'll probably change next month or two I'd guess. But unless I'm entirely off base and talking about the wrong thing, I think your comment is very misleading.
If this happened with Safari, you'd likely see a patch pretty quickly, and it would be available to almost everyone at the same time.
In addition to the Browser app that is still widely use in devices with less-than-latest Android versions, It's present in every app that uses WebView. And you only get fixes to WebView via OS updates. (x)
(x) Maybe. Assuming someone bothers to incorporate them into to the OS update for your device and they make it through the hurdles between the engineer and OTA update certification.
WebView uses Chrome as of 4.4 as well. Also many apps that use WebView show only their own content in it. There are only a couple apps that show user specified content in app via WebView, like Reddit and HN.
Even if I were to go back to the old Internet app instead of Chrome, this bug is irrelevant to me since I use an app for GMail, Twitter, Facebook and anything else important. I can't remember the last time I used the mobile browser for anything that matters.
It's still a copy of the browser code that comes with the base OS, even if it dodges the bullet on this bug. The Chromium-based WebView doesn't receive updates like the Chrome app so will generally contain unpatched vulnerabilities, so the system level issue remains.
(Note that the rare-to-nonexsistent OS updates are still a problem, this WebView issue nonwithstanding. They are running old vulnerable Linux kernels which compromises the app sandbox)
Think of it the way Apple abandoned Safari for Windows without letting the users know. They're still using Safari for Windows, it's just completely insecure and they have no idea.
I'm wondering if it would be more readable with actual angle brackets rather than less than and greater than signs.
from_str::<Option<uint>>
vs
from_str::‹Opton‹uint››
Hmm. Those are a little lightweight, are actually angle quotes, not angle brackets. Actual angle brackets aren't available on my keyboard, but would look like:
from_str::⟨Option⟨uint⟩⟩
Jeez, why does Unicode have so many different variations on angle brackets? The above are "mathematical left/right angle bracket", but there's also:
from_str::〈Option〈uint〉〉
Which uses "left/right-pointing angle bracket" and:
from_str::〈Option〈uint〉〉
Which uses "left/right angle bracket"
At least in the font I'm typing this in, the "left/right-pointing angle brackets" look the best to me. It would be really nice if now that Unicode is ubiquitous, we could standardize on keyboard layouts that get you access to more punctuation like this, so that people didn't have to keep fighting over a fairly limited amount of punctuation to use as technical notation in programming languages.
My understanding is that in order to make a proposal like this (any change to the syntax or semantics of the language or standard library), the way to advocate a change is to write an RFC. To do so, you fork the rfcs repo on GitHub (https://github.com/rust-lang/rfcs), and write a document describing your proposal and its pros and cons. Then the community can discuss it, and if there's sufficient interest someone will champion for it a shepherd it through the RFC process.
But dhclient calls dhclient-script to execute various hook scripts, and dhclient-script uses #!/bin/bash and is thus vulnerable.
On my particular Debian system, it doesn't look like NetworkManager based DHCP is affected, as it doesn't call the dhclient-script. It does call various scripts in /etc/network/if-*.d/, but none of the ones that I have installed use bash, they all use sh. However, if I deliberately put a bash script in there, and attach it to the network with the rogue DHCP server, it does get passed the bad environment variable (though on my Debian system I've already updated Bash so I just get the error message rather than the exploit).
So yeah, there are a a lot of ways for a stray Bash script to cause problems here.