by tdicola · 12y ago · 0 comments
Let's say, for the sake of argument, that your ISP's DHCP server is compromised. A worm could then spread to your system from it.
This is entirely hypothetical, but not impossible.
It seems that server_name from DHCP response is passed to environment variable without sanitising.
3437 if (check_option_values(NULL, DHO_HOST_NAME,
3438 lease->server_name,
3439 strlen(lease->server_name)) == 0 ) {
3440 client_envadd (client, prefix, "server_name",
3441 "%s", lease->server_name);
And script that is run after that (dhclient-script) is written in bash at least on Debian.See code here: http://lists.alioth.debian.org/pipermail/pkg-dhcp-commits/20...
Basically, it may not be as immediately exploitable for desktop systems without a web-server as other bugs have been, but I wouldn't be surprised to see something pop-up in the near future.
A fair bit of warning though that some scripts might break, but at least you know why (if the alternative is to turn off the machine until you trust bash again then you may have to wait forever).
On a standard Ubuntu or Debian most shell scripts uses dash anyway so it shouldn't be too bad.
Virtually any software that takes input from the internet can be a target, and enumerating the combination of versions and configurations is futile. We all need a working bash patch.
Not running a webserver protects against GET spray-n-pray, but you shouldn't feel safe.