SpiderLabs Blog

RCE root in all current Samba versions

Written by Space Rogue | Apr 11, 2012 4:49:00 AM

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: