While perusing the change log for the release of SAMBA that was pushed out today a member of the SpiderLabs team (Rodrigo Montoro) noticed a CVE number in the change log. When we dug a little deeper we found that this CVE was for a remote root exploit! And it’s pretty nasty. It affects all current versions of Samba from 3.0 onward and will allow remote code execution as the root user without an authenticated connection. That’s about as bad as bad can get when your talking about vulnerabilities.
The flaw can be found in the code generator for the remote procedure call, which can generate vulnerable code. A specially crafted RPC call can then cause the server to execute arbitrary code. The worst part is that it doesn’t require any sort of authenticated connection to a server! In addition a high quality proof of concept has already been released basically making this point and click.
Nasty.
And it gets worse; Samba is everywhere that Linux is. Got a NAS device on your network with an embedded Linux server? You probably have Samba, and you probably can’t update it since it’s embedded.
Don’t forget that OSX used to include Samba up to OSX 10.6, but it looks like Apple stopped updating the version it used at 3.0.X meaning that this time, Apple's failure to keep up with the latest and greatest might have saved its bacon.
So what can you do? Update your Samba to one of the new versions, if you can. If you can’t upgrade because your Linux is embedded seriously consider replacing your device, yes, this is that bad. If your servers are in production and can’t risk the update right now then edit your ‘hosts allow’ parameter inside smb.conf to restrict access. Editing SMB.CONF should not be seen as a complete fix but only as a way to help mitigate an attack.
This is one of the most severe vulnerabilities that we have seen a while, it affects a wide variety of systems, already has a proof of concept and give an attacker a lot of access, root access!
Digitized Chuck Yeager says:

I'm still unclear as to whether Apple Macs are vulnerable or not. Snow Leopard uses Version 3.0.28a-apple and Leopard Version 3.0.25a-apple. These number sequences are within the vulnerable range, as far as I can tell. Therefore I assume that any 10.5 or 10.6 Mac with File Sharing enabled and SMB sharing ticked is vulnerable. Can anyone confirm?
Posted by: Mungo2k | 16 April 2012 at 05:14
Incorrect. Apple ship Samba server 3.0.x, they refused to ship 3.2.0 onwards for religious (i.e. anti-GPLv3) reasons. You are correct in the MacOSX has its own internal SMB/CIFS client, not Samba.
We have provided patches to Apple for this problem.
Jeremy Allison,
Samba Team.
Posted by: Jeremy Allison | 11 April 2012 at 11:48
Apple doesn't include Samba at all anymore and they never moved beyond version 2 when they were including it for SMB hosting.
It's never been used for client connections on the Mac.
Posted by: Macshome | 10 April 2012 at 15:56