Slashdot Mirror


Samba Hit By 'Highly Critical' Vulnerability

sawky puck writes "Researchers at Secunia have flagged a 'highly critical' vulnerability in Samba, the widely deployed open-source software for networked file sharing and printing. Successful exploitation allows execution of arbitrary code by tricking a user into connecting to a malicious server (e.g. by clicking an 'smb://' link) or by sending specially crafted packets to an 'nmbd' server configured as a local or domain master browser. This issue affects both Samba client and server installations."

70 comments

  1. CVE-2008-1105 by xmas2003 · · Score: 4, Informative

    Here's the assigned Common Vulnerabilities and Exposures - "Boundary failure when parsing SMB responses can result in a buffer overrun"

    --
    Hulk SMASH Celiac Disease
    1. Re:CVE-2008-1105 by Anonymous Coward · · Score: 0

      The Linux kernel has a few scripts floating around online that provide static analysis of the code. Does Samba have such a feature? I figure a few scripts * hundreds of users with different versions of Samba = more bug finding.

    2. Re:CVE-2008-1105 by Besna · · Score: 1, Informative

      You wouldn't find this by static analysis. The constant in the key comparison is presumably fixed, but the variable "len" is not.

  2. Oh jeez by blackjackshellac · · Score: 5, Funny

    I guess I better take all of my samba servers off the internet!

    <snark/>

    --
    Salut,

    Jacques

    1. Re:Oh jeez by Thelasko · · Score: 1

      exactly what I was thinking.

      --
      One of our competitors trademarked the term "hypothesis". From now on, we will call them "boneheaded ideas".
    2. Re:Oh jeez by Bogtha · · Score: 1

      This affects clients too. It says so right there in the summary even.

      --
      Bogtha Bogtha Bogtha
    3. Re:Oh jeez by Gazzonyx · · Score: 1

      I'll check them for you, free of charge... what did you say their IPs were? :)

      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    4. Re:Oh jeez by value_added · · Score: 4, Funny

      I'll check them for you, free of charge... what did you say their IPs were? :)

      My guess is that most of his servers are in the 10/8 or 192.168/16 ranges. Run an nmap scan on those netblocks and I'll bet you'll find something. While you're at it, be sure to check out 127.0.0.1 for any "hidden" servers.

    5. Re:Oh jeez by fluch · · Score: 1

      The usual 127.0.0.1. What did you think?

    6. Re:Oh jeez by Anonymous Coward · · Score: 1, Funny

      Hah! I've got you now, you idi

    7. Re:Oh jeez by man_of_mr_e · · Score: 2, Informative

      That's not going to help you if you click on a malicious smb:// link. Your only hope is to egress block SMB ports (which probably isn't a bad idea anyways).

    8. Re:Oh jeez by Carnildo · · Score: 1

      192.168.0.4 and 192.168.17.26

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    9. Re:Oh jeez by Anonymous Coward · · Score: 0

      You do realize that there are people just as eager/willing to hack networks internally as there are externally? In my experience there's more of a danger of a security breach from the employees themselves than from the outside.

    10. Re:Oh jeez by blackjackshellac · · Score: 0

      Well duh, you do realize I was joking, right?

      Fscking ACs.

      --
      Salut,

      Jacques

  3. Guess we'll see Apple release 2008-004 soon by argent · · Score: 1

    Because there's nothing about Samba in 2008-003.

  4. Already Patched by Gazzonyx · · Score: 4, Informative

    Check the samba lists. It's already been fixed and the Debian team should be sending a patched version of samba to their repos for downstream distros either last night or some time today. It's already been rolled in to 3.0.30, IIRC.

    --

    If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    1. Re:Already Patched by BiggerIsBetter · · Score: 2, Funny

      It's already been fixed and the Debian team should be sending a patched version of samba to their repos for downstream distros either last night or some time today. Yeah, but how long before someone fixes that patch? 2 years?
      --
      Forget thrust, drag, lift and weight. Airplanes fly because of money.
    2. Re:Already Patched by shamer · · Score: 1

      Gentoo is patched as well.

      net-fs/samba-3.0.28a-r1

  5. Vulnerability? And how! by Applekid · · Score: 1, Funny

    I sure know I have a highly critical vulnerability to a pretty Brazillian lady doing the Samba, eh gents?

    --
    More Twoson than Cupertino
    1. Re:Vulnerability? And how! by kellyb9 · · Score: 0, Offtopic

      I sure know I have a highly critical vulnerability to a pretty Brazillian lady doing the Samba, eh gents? I know you can mod something funny, but is there any way to mod something !Funny?
    2. Re:Vulnerability? And how! by Applekid · · Score: 1

      I sure know I have a highly critical vulnerability to a pretty Brazillian lady doing the Samba, eh gents? I know you can mod something funny, but is there any way to mod something !Funny? Offtopic seems to be the mod of choice in this case. I always thought nerds like me loved puns. Maybe only good puns, though.

      Other unused one-liners:
      "When I do the Samba I'm pretty vulnerable to kicks to the knees"
      "Samba has always been vulnerable... to arthritis"
      "This vulnerability is easily fixed by switching the audio back to a simple 2/4 beat."
      --
      More Twoson than Cupertino
    3. Re:Vulnerability? And how! by Anonymous Coward · · Score: 0

      offtopic is what I use.

    4. Re:Vulnerability? And how! by Mr.+Jaggers · · Score: 1

      I use judicious quantities of "Overrated".

      It's my most favorite-est mod ever.

      --

      When I grow up, I want to have Christopher Walken hair.
  6. buffer overrun .. by rs232 · · Score: 2, Interesting

    "Boundary failure when parsing SMB responses can result in a buffer overrun"

    Does this apply to a particular CPU/MMU compiler combination or is it generic across all systems? Is it technically possible to design a system that is immune to buffer overruns or, by default, fails safe, as in not allowing any old code to walk all over the address space.

    --
    davecb5620@gmail.com
    1. Re:buffer overrun .. by kvezach · · Score: 5, Informative

      Not in general. Straightforward "execute what you want" buffer overruns can be thwarted by using no-execute; however, this doesn't stop the overrun from overwriting data so that the right functions will have the wrong input and thus do what the exploit writer wants. So-called return-to-libc attacks (where the exploit writer rearranges the stack so that it calls prexisting functions with interesting parameters) can be made very hard to pull off with address space randomization, but that doesn't help on architectures with 32-bit or lesser size pointers.

      Radical virtualization might mitigate the effects so that the bugs are irrelevant (as would a capabilities based system where, even if you do smash the stack, there's nothing interesting you can do with the privileges gained), but that's not stopping the buffer overruns themselves, just making them moot.

    2. Re:buffer overrun .. by Besna · · Score: 0

      There is the NX bit, but you'd have to know about how far the buffer can overrun.

    3. Re:buffer overrun .. by Anonymous Coward · · Score: 2, Interesting

      Possible? Yes. Possible without sacrificing all hopes of decent performance? Not as far as we know.

      For example, you could use your 64-bit address space and put /every single object ever/ in its own page, at 0xXXXXXXXX00000000. Trap pages all around. That ought to do the trick, but now your TLB's shot, and your ints are 4kb large.

    4. Re:buffer overrun .. by kestasjk · · Score: 4, Funny

      Is it technically possible to design a system that is immune to buffer overruns or, by default, fails safe, as in not allowing any old code to walk all over the address space. Microsoft labs are working on a solution that'll work like this: "The program you are using wants to write 0x0a83d9ed to the stack at address 0x912dfe31. Confirm or Deny?"
      --
      // MD_Update(&m,buf,j);
    5. Re:buffer overrun .. by Anonymous Coward · · Score: 0

      yes its called EP, Execute Protection. Memory flagged as DATA will not and cannot be executed in hardware. Period.

    6. Re:buffer overrun .. by Anonymous Coward · · Score: 0

      Through there would be no general defense from a dedicated attacker who is actively trying to exploit your system, there are some practical defenses to the most common form of this kind of attack (gcc -fstack-protector-all):
      http://en.wikipedia.org/wiki/Stack-smashing_protection

      The article describes it fairly well. If someone determined your "canary" the attack could still be made to work. Nonetheless, a remote attacker may have significant trouble learning of this. This mechanism still leaves the software vulnerable to DoS, but it would prevent malicious code execution. Of course, this means that either the vendor/provider compiles the code in this way or that you do.

    7. Re:buffer overrun .. by Anonymous Coward · · Score: 1, Funny

      Is it technically possible to design a system that is immune to buffer overruns or, by default, fails safe, as in not allowing any old code to walk all over the address space. Yes. It's called "OpenBSD".
    8. Re:buffer overrun .. by owlstead · · Score: 2, Interesting

      "Does this apply to a particular CPU/MMU compiler combination or is it generic across all systems? Is it technically possible to design a system that is immune to buffer overruns or, by default, fails safe, as in not allowing any old code to walk all over the address space."

      Yes, it's called managed code (Java/.NET) and yes, you can even design hardware that runs byte code. It will slightly hamper performance, but it has its advantages. Of course, the way it is currently done is to implement the JVM in software. That's ok though, you have such a small target running unsafe code that the number of buffer overruns is insignificant.

      When there is a problem, an exception is raised. But an exception is a basic component in the byte code and it just crashes that part of the system at worst. Obviously that does not mean you cannot create mistakes when using managed code, but they tend not to spread as far.

      Together with a good messaging system and/or immutable objects, you can create a heck of a safe system.

    9. Re:buffer overrun .. by ultranova · · Score: 1

      Is it technically possible to design a system that is immune to buffer overruns or, by default, fails safe, as in not allowing any old code to walk all over the address space.

      Yes: Java, for example, assuming that the JVM itself doesn't have any bugs. Let the flamefest begin.

      Please note, however, that any sufficiently complex protocol can be considered a programming language in itself, and the program using it a virtual machine; and it is impossible to guarantee that the interpreter can't be put into an incorrect state with sufficiently corrupt inputs.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    10. Re:buffer overrun .. by jonadab · · Score: 1

      > Is it technically possible to design a system that is immune to buffer overruns or, by
      > default, fails safe, as in not allowing any old code to walk all over the address space.

      I don't know about "immune" in the absolute sense, but there are certainly things you can do. Writing everything (_everything_, including low-level system libraries) in a very-high-level language that dynamically resizes/reallocates buffers as necessary (e.g., integers automatically promote to bigints if they overflow, writing past the end of a string causes a longer string buffer to be allocated automatically, and so on) would help, but of course that has performance implications. It's less absurd to contemplate that now than it would have been twenty years ago, but it would still mean everything would have to be written that way from the ground up, and legacy code could only be run via virtualization and would not receive the same kind of protection. Taint checking is even better, but again you're now talking about writing everything in a VHLL, so performance is going to be an issue.

      Address randomization and NX also help. Not as much as the aforementioned technologies, but OTOH they also have rather less impact on performance.

      Tradeoffs. Security is all about tradeoffs.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  7. Samba isn't Windows by JSBiff · · Score: 1, Flamebait

    Samba isn't Windows, this isn't a Windows vulnerability. Thanks for playing. Try again.

    1. Re:Samba isn't Windows by night_flyer · · Score: 1

      looks like you were the one who got played....

      --


      Thanks to file sharing, I purchase more CDs
      Thanks to the RIAA, I buy them used...
    2. Re:Samba isn't Windows by rs232 · · Score: 1

      "Samba isn't Windows, this isn't a Windows vulnerability. Thanks for playing. Try again"

      Is it a x86 architecture only vulnerability?

      --
      davecb5620@gmail.com
    3. Re:Samba isn't Windows by plague3106 · · Score: 1

      No, it's not, but these kinds of things in WINDOWS lead administrators to block those ports and in out of their networks... which would affect this as well. Windows DID have vunerablities in the SMB protocol way back when..

    4. Re:Samba isn't Windows by Gewalt · · Score: 1

      Whoosh!

      --
      Modding Trolls +1 inciteful since 1999
    5. Re:Samba isn't Windows by Anonymous Coward · · Score: 0

      'Samba isn't Windows, this isn't a Windows vulnerability. Thanks for playing. Try again."

      That's probably why this article gets a tiny little mention on the front page instead of a full page blasting like a Windows vulnerability would.

    6. Re:Samba isn't Windows by mrbluze · · Score: 1

      Samba isn't Windows, this isn't a Windows vulnerability. Thanks for playing. Try again.

      Whew, for a minute there I thought Windows MIGHT have a vulnerability for once.

      "Thanks for playing. Try again."

      You won't make friends by belittling people.
      --
      Do it yourself, because no one else will do it yourself. [beta blockade 10-17 Feb]
  8. Re:More M$ Vulnerabilities by TheCabal · · Score: 1

    Samba != Windows

    FAIL

  9. smb/nmb filtered by default preventing this by Danny+Rathjens · · Score: 3, Informative

    Every network I've been on and even some of my current company's ISPs have a policy of blocking all traffic to ports 137 and 139.
    Those types of filters prevent anyone following a smb:// link outside their network.

    I think this is from way back in the day when remote MS Windows SMB/NMB exploits were a dime a dozen and/or network admins wanted to make sure files weren't being shared to the world.

    1. Re:smb/nmb filtered by default preventing this by jawtheshark · · Score: 1

      Actually, I'm not on a corporate network and I block every port except the few I really use. That should be the golden standard. At my current client, I just said, "Hey I need port 22 open please". I got it withing 2 minutes and you do know what that means, don't you?

      I am frankly more paranoid on my personal network that any network I've been on professionally.

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
  10. how about this .. by rs232 · · Score: 3, Interesting

    "There is the NX bit, but you'd have to know about how far the buffer can overrun"

    "we adapted the memory safety techniques from the SAFECode project .. This work makes the kernel immune to buffer overruns, dangling pointers, and other memory error vulnerabilities"

    --
    davecb5620@gmail.com
  11. CIFS by FunkyELF · · Score: 0, Offtopic

    I noticed recently that Samba was deprecated in the kernel and that you're supposed to use CIFS. But this is for mounting...what about the servers. Is there a CIFS server for Linux...I know there is one for Solaris.

    1. Re:CIFS by profplump · · Score: 4, Informative

      There's a CIFS server for linux -- it's called Samba.

      The bit being deprecated is the SMB network file system, not Samba (which isn't part of the kernel in the first place). The CIFS network file system now supported in the kernel is fully compatible with Samba file servers, and Samba file servers require neither SMB NFS nor CIFS NFS to be enabled in the kernel.

    2. Re:CIFS by Hatta · · Score: 3, Informative

      Same thing pretty much. CIFS is an updated version of SMB, samba supports them both. This might clear it up for you.

      --
      Give me Classic Slashdot or give me death!
  12. This is why we have SELinux by FranTaylor · · Score: 5, Informative

    "Arbitrary" code will see lots of 'permission denied' errors as it tries to do evil.

    1. Re:This is why we have SELinux by pembo13 · · Score: 0

      Except for those admins too lazy to make sure SELinux us working.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    2. Re:This is why we have SELinux by RiotingPacifist · · Score: 1

      or PAX lets not forget about poor little pax.

      --
      IranAir Flight 655 never forget!
    3. Re:This is why we have SELinux by timbo234 · · Score: 1

      Except for those admins too lazy to make sure SELinux us working.

      Should read "except for anyone who's deliberately hacked their samba configuration to run as root". Considering there's no need to do this, and all distros package samba to create and run as it's own unprivileged uid, this will be pretty much nobody. And anyone who has done that has only themselves to blame.

      --
      Pre-canned Evolution Links for all those Slashdot holy wars.
    4. Re:This is why we have SELinux by timbo234 · · Score: 1

      Oh shit, sorry didn't check before I posted. Seems samba does actually run as root. Anyone know why this is?

      --
      Pre-canned Evolution Links for all those Slashdot holy wars.
    5. Re:This is why we have SELinux by Dog-Cow · · Score: 1

      When you connect as a Unix user, samba will spawn a process that runs as that user. The root process still needs to run as root to be able to do this. All daemons which must assume other EUIDs work this way.

      Samba will spawn a process that runs as a configured (by default: nobody) user when the connecting user isn't a local (or NIS, ldap, etc) account. Again, it needs to start off as root in order to do this.

    6. Re:This is why we have SELinux by ultranova · · Score: 1

      "Arbitrary" code will see lots of 'permission denied' errors as it tries to do evil.

      Unless, of course, someone was so careless as to let a server who's purpose is to grant remote access to the filesystem actually access the filesystem it is supposed to grant access to :).

      There is no way to detect the difference between an evil program overwriting an important file with random garbage and a saintly user editing that same file to contain extremely relevant data. Consequently, SELinux doesn't help at all here. Samba simply has too wide a function to effectively restrict it and still let it do its work.

      Unless, of course, you have a policy to deny all actions for programs with the evil bit set ;).

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  13. What's that saying, about security and obscurity? by Anonymous Coward · · Score: 0

    I'll bet all those people using SAMBA are really happy they didn't use Windows servers instead. Teh FOSS community can obviously do a better job!

    Looks like SAMBA might need at least one more set of eyes!

    Lunix: got r00t?

  14. The last major Samba vulnerability... by rwa2 · · Score: 1

    ... drove me to switch from Redhat 4 to Debian while cleaning up from a remote root compromise. Granted, it was pretty entertaining discovering the rootkit and tracing it back through a few other compromised servers.

    Anyway, hoping I won't be driven from Debian to, uh, Gentoo or something.

    1. Re:The last major Samba vulnerability... by Jeremy+Allison+-+Sam · · Score: 3, Informative

      There was no exploit known in the wild before this was discovered and patched, so if you install the Debian patch asap you should be fine.

      Jeremy.

  15. Re:More M$ Vulnerabilities by tomhudson · · Score: 1

    Samba != Windows

    In my neck of the woods, it is. The linux desktops are configured NOT to have any publicly-shared directories. Want to transfer a file over the lan? Use ftp like __DIETY__ intended!

  16. Re:More M$ Vulnerabilities by nog_lorp · · Score: 2, Funny
  17. Samba's travails by Rambo+Tribble · · Score: 1

    All I can say is that the Samba team is going to have to roll in more vulnerabilities than this if they want to really mimic Microsoft. C'mon guys, are you even trying?

  18. MOD PARENT UP by Anonymous Coward · · Score: 0

    MOD PARENT UP, it's a post by Jeremy himself

  19. what manages the managed code ? .. by rs232 · · Score: 1

    "Yes, it's called managed code (Java/.NET)"

    Another software solution, which also begs the question, what protects the 'managed code' bits from getting buffer overruns and wouldn't it be simpler to do it in the hardware? Of course the 'managed code' bits are only good in so far as they manage to detect malware all the time. Wouldn't it be simpler to make the kernel immune to these type of bugs as in the SAFECode project. That way when a process fails on garbage collection hooks, exception handling, type safety, array bounds and index checking, nothing happens.

    I remember when there was only two kinds of ones and noughts, code and data and as long as you didn't download and run someone elses code you were totally safe. Another question to raise, and I realize I am crying in the wilderness here, is there any other way of achieving Web 2 type functionality without sacrificing security. Like, the current security debacle was caused by bad design decisions made years ago, something that is going to cost and is still not fixed, if at all fixable given the current state of 'innovation'.

    --
    davecb5620@gmail.com