Buffer Overflow in Sendmail 478
ChiefArcher writes "On the footsteps of openssh, Sendmail 8.12.10 has just been released due to a buffer overflow in address parsing. Sendmail states this is potentially remotely exploitable. No updates on the Sendmail site yet, but the FTP site has the release notes."
Use qmail (Score:5, Informative)
Re:Use qmail (Score:5, Informative)
Use Postfix [postfix.org]! Ok, use either really, just stop using Sendmail. I run Qmail at work (due to legacy and converting Qmail's Maildir to Cyrus' Maildir just seems neigh impossible) and Postfix at home. Postfix is really straight-foward on setup and has TONS of documentation in the conf files.
Qmail, on the other hand has tons of docs on the site and lists a number of different ways to perform various tasks.
It's really a crap-shoot as to which you prefer. Just STOP USING SENDMAIL!
Re:Use qmail (Score:3, Informative)
Here [mikecathey.com] is the most relevant part of the perl module I wrote to handle the migration.
Please not that there are several system dependent settings in this function. Our spool was hashed to depth two. I will probably end up rewriting this module to proxy for the user, authenticating as cyrus, which would be much cleaner.
We've been using Postfix/Cyrus in production for a while now and we're really ha
Re:Use qmail (Score:5, Informative)
from the release notes:
"Fix a potential buffer overflow in ruleset parsing. This problem
is not exploitable in the default sendmail configuration;
only if non-standard rulesets recipient (2), final (4), or
mailer-specific envelope recipients rulesets are used then
a problem may occur. "
http://www.sendmail.org/8.12.10.html
While I agree it's necessary to patch systems, this is hardly like the Blaster worm. I'm going to go way out on a limb here and say that 99.99% of all sendmail installations in the world don't use these rulesets. And anyone who IS using them is likely to be a sendmail weenie anyhow and they'll just take a break from writing their AI Chess program in sendmail.cf and patch it themselves.
There are *TWO* bugs (Score:5, Informative)
Actuall, more than two: the changelog includes several fixes. Right above the fix you quote, there's one that *is* exploitable, which is why they've gone ahead and released it:
The fact it's separate bugs is clear from the indention in the original (Fscking /. doesn't support PRE)
Re:Use qmail (Score:3, Informative)
Great idea! I'll just download a package from my favorite distribution that's tuned qmail to mesh nicely with how my system is configured.
Hmm, they don't supply packages for qmail. Why not? They're not allowed to [cr.yp.to]. If I take the time to make up such a package, I'm not allowed to give it to my friend.
Quoth Bernstein:
Darn those pesky integrators, attempting to make thei
qmail install HOWTO and RPMs (Score:3, Informative)
Re:Use qmail (Score:3, Funny)
"Email Different" (Score:5, Funny)
That's why you should entrust all your email services to Hotmail.
Re:"Email Different" (Score:5, Funny)
You've got a point there.
While not as flexible as mutt on a *nix server, at least Hotmail is basicly secure.
Re:"Email Different" (Score:3, Informative)
Re:"Email Different" (Score:5, Insightful)
I need a mail server for non-sensitive e-mails. If someone roots Hotmail's server, I couldn't care less about it. If someone roots my server, then it's a whole different matter. I also use it to prevent handing out my real email address to the myriad of sites that require e-mail registration and for usenet postings.
So yes, in my case Hotmail is a very secure solution.
Why support MS and get spam? (Score:5, Interesting)
Re:"Email Different" (Score:3, Interesting)
Re:"Email Different" (Score:4, Funny)
It's on the site now (Score:5, Informative)
I've already downloaded and installed it. Thank goodness for Slackbuild scripts
Re:It's on the site now (Score:2, Funny)
*cough* (Score:2, Flamebait)
Mistakes happen to everyone, and microsoft code isn't necessarily even the most important part of the internet.
Re:*cough* (Score:3, Insightful)
The difference is that Microsofts patches take forever to come out and introduce more holes than anything else.
In linux patches come out the same day... and are well documented.
Re:*cough* (Score:3, Insightful)
Really? What holes were introduced by, say, the Blaster worm patch? Or any other patches you care to name?
Can't argue about the speed of patches, exactly, but I'd point out that MS almost always releases a patch before the bug in question is widely exploited -- the problem with the last few worms/viruses was more with unpatched systems than lack of responsiveness on MS's part. MS could come out
Why? (Score:2)
Re:*cough* (Score:3, Insightful)
Sendmail has never had a good reputation for code quality. MS doesn't either. Whats your point?
Re:*cough* (Score:2, Insightful)
Hand raised, hand raised!!! (Score:2)
Heckle, I command thee.
And yet, strangely, I feel compelled to agree with you that Microsoft code is not the most important part of the Internet. Very true. In fact, if the only code out there was Microsoft's there would be no Internet.
OK, you can heckle now, I'm mentally prepared.
Re:*cough* (Score:2)
Microsoft is closed source - so we never get to see their code. And even though they keep it under wraps - it's still more exploitable on average than most Open Source code.
Microsoft still is on the "patch all stck overflows" ramp that most open source software fixed a few years ago.
Most bugs in Open Source, now, tend to be really obscure ones.
Re:*cough* (Score:3, Insightful)
Maybe the reason MS and sendmail products are so often compromized is that they are both very popular and thus are a good target for security companies? You would not get a big fame (did I say money?) for finding bugs in some obscure product. However finding bug in any Microsoft product or sendmail will bring you to headlines immediately.
Re:*cough* (Score:2)
Fortunately most open source software is on the server side right now, so there are fewer machines and are run by more savvy people, so patches get applied a lot faster. But just wait, if linux gets popular on the desktop, they'll have the same issues as Windows: either force patches on users, or have users who wait three months until the worm exploit comes out before clicking on the "accept update" butto
Re:*cough* (Score:3, Informative)
Sendmail's future (Score:4, Interesting)
Re:Sendmail's future (Score:3, Informative)
Is it perhaps time for a code rewrite in Sendmail...
IIRC 8.9 was the code rewrite.
maybe a quiet, dignified retirement?
At this point, I'd settle for a noisy drag-it-out-back-and-shoot-it.
Secure alternatives exist - Postfix [postfix.org], qmail [qmail.org]. Other alternatives with better security track records and lower target profiles exist - Exim [exim.org], Courier [sourceforge.net].
Time and past time to move. How many holes is it going to take?
Re:Sendmail's future (Score:5, Insightful)
A fairer assessment is that, when sendmail was designed, security was not as big an issue as it has become today. And in their defense, they do seem quite good about notifying people when vunerabilities arise and releasing fixes as quickly as possible.
That being said, sendmail is a pain in the ass. You have to remember that when sendmail was developed, there were many different mail protocols (besides SMTP), and sendmail had to support all of them -- this is why sendmail config files are so darned complex and unreadable. The vast majority of those have faded into obscurity, so subsequent products, like Postfix, can be much simpler and less complex and, thus, more likely to be secure. For a long time, sendmail was the only choice for a real MTA, but I think Postfix has proven itself a worthy successor.
Re:Sendmail's future (Score:3, Insightful)
Absolutely. In sendmail's heyday, the internet was a collection of several hundred .edu and .mil organizations, with a few .com technology companies thrown in, notably IBM and DEC. The few hundred thousand people on the net tended to be researchers and faculty in technical fields and their students. Security was very lax because it was a relatively small, closed, professional society. Peop
Re:Sendmail's future (Score:4, Informative)
So are you saying it is designed with security in mind?
So you saying (agreeing) it is designed without security in mind.
It's been years since the internet operated where everyone allowed relaying to help everyone else out. And go look at the code, they still use NIL terminated char *'s [and.org] all over the place. Mostly with limited length APIs like strlcpy(), but even a few strcpy()s.
Now go look at postfix or qmail, but have fully dynamic string APIs [and.org] and use them everywhere. And supprise supprise neither has had a buffer overflow.
Re:Sendmail's future (Score:2)
Re:Sendmail's future (Score:5, Funny)
Re:Sendmail's future (Score:3, Insightful)
As with most legacy software, there is a large investment in the expertise people have built up in learning how to use/configure it. So retirement won't get rid of it. Rewriting it may just lead to creation of new security flaws (for example, openssh, is a far more modern code which is far more motivated to be secure from the get go, but as recent advisories/exploits have shown that doesn't make it magically bug-fre
Yay! (Score:5, Funny)
Re: (Score:3, Funny)
Lazy Story Submitter (Score:4, Informative)
Aight... I'll fill in the blanks
ftp://ftp.sendmail.org/pub/sendmail/RELEASE_NOTE S
Fix this at the language level? (Score:3, Interesting)
Re:Fix this at the language level? (Score:3, Funny)
Re:Fix this at the language level? (Score:3, Funny)
I wouldn't be surprised entirely if it turned out that sendmail was the first (and only) non-trivial program that could be expressed in brainfuck [muppetlabs.com]. I fact, I believe that sendmail.cf [busan.edu] had been ported to brainfuck already.
Yeah, java fixes this (Score:2)
sendmail == microsoft (Score:2, Interesting)
Re:sendmail == microsoft (Score:2)
Somebody will pay you to bang your head on the wall?
BTW, no way [stuffmagazine.com].
Nice week for open source (Score:5, Insightful)
Re:Nice week for open source (Score:2)
Acutally their is a BIND9 patch today... (Score:4, Insightful)
Re:Nice week for open source (Score:2)
Based on recent events, I'd venture that what's next is sendmail again, followed by OpenSSH, followed by sendmail 3 or 4 more times.
How does an overflow work? (Score:2, Interesting)
Re:How does an overflow work? (Score:2)
At least, that's the senior-level CS major explanation...
Re:How does an overflow work? (Score:4, Informative)
Google for "Smashing the stack for fun and profit". I don't know too much of the specifics -- I'm not a script kiddie.
Re:How does an overflow work? (Score:3, Interesting)
When you create a buffer it tends to use *short* addressing, which means the buffer location is NEAR the code that is being executed. Generally something like,
Store a char
Increment buffer pointer by one,
am I done?
No repeat
The problem is that if the buffer "overflows" it wraps the addressing to back over the instructions being executed.
And it turns out that this behavior i
Yh..... fffsdfksjkldll.... WHAT? (Score:4, Interesting)
Who modded this up?
There is no way in hell you'll cause a pointer to wrap around and come back up since if you write to the page mmaped at 0 on essentially every OS out there you get a page fault (and the OS kills the program, Null pointer exception). And before that you walk all over the pages that are between the break and stack, unallocated, or maybe all over the read-only shared libs, and they all will cause page faults and SIGSEGV your ass into next Tuesday.
Here's krog. Krog allocate automatic variable on stack. Stack grow downward. Data fills from lower to upper address (opposite stack growingness). Krog no check length of input. Krog overwrite stack not belonging to his stack frame (previous call). Ooomba, clever hacker, he know offset to return address in leaky function. OOmba, he sendum nasty input Krog no check length on that overwrite return address. When function return, it jump back into buffer instead of last function. Buffer gottem nasty root shell code, not data.
Krog sad.
Ooomba does happy dance.
Yes. Check your inputs.
YES DONT ASSUME YOU KNOW ANYTHING ABOUT HOW LARGE A BUFFER IS
YES, FOR GODS SAKE PEOPLE, NEVER ALLOCATE BUFFERS AS AUTOMATIC VARIABLES ON THE STACK!!! ARE YOU INSANE!!!!!!!!>?>>>>>>>
Re:How does an overflow work? (Score:5, Informative)
By feeding in a string longer than 100 characters, you go up the stack and can overwrite the return address to the call to 'foo'. You might replace the address with a pointer to code you've embedded in the oversized string. When the call returns, it jumps into your code rather than the calling procedure.
This is a really difficult one (Score:5, Funny)
Comedy is inappropriate. "Is that sendmail dead? No, it's just sleeping. Oh, I could swear it was dead! No, it's just tired, see? Sendmail gottan exploit, sendmail gottan exploit!"
Irony is difficult. To be honest, I can't even be sure which ironic form I would employ in this case. Forget irony.
Sarcasm? "Sendmail, yeah, like we're still using that dinosaur!" What, we are? Dang. Why? "Cause it was there?" What kind of an excuse is that?!
Nihilism... "yes, another day, another exploit. ssh, now sendmail. I can just see the future, one long bitter trail of unpatched software, server after server to upgrade. brain the size of a planet, and here I am, patching sendmail. what's the use, I ask you...?"
Slashdotisms? All your sendmail overlords are 1-2-3 profit to us? Imagine? In Russia? No, no, no.
SCO! SCO! "It's not an exploit, it's a snippet!!!" Worth a try.
Damn you to the deepest depths of hell, Slsadhot edirots, this story has so little karma leverage it hurts.
Re:Imagine a beowulf cluster of Slashdotisms (Score:2)
sendmail vulnerability!?!?! (Score:2)
Gasp!
Why, this is totally unprecedented!
This hasn't happened since...uhm...well...for at least about 15 minutes now.
Before the Microsoft defenders say it... (Score:3, Insightful)
It is true that any system can have unintentional bugs that lead to security vulnerabilities. This is true of any system and not just Microsoft. Therefore, Microsoft should not be unfairly bashed due to these kinds of bugs, any more than any other system.
But there is another kind of security problem for which Microsoft is deservedly bashed. The problem Microsoft is bashed for having poor security is when their system is insecure in its design. (It may not have been a design goal.)
Examples would include, running a webserver under the System or Administrator account so that once it is compromised, the system is rooted. Installing and activating services by default. These problems are all caused by security having a low priority in the past, and Microsoft is deservedly bashed for these. Nimbda or Slammer may be buffer overflows which could happen to anyone, but there is some deserved criticism as to why it was such a huge problem.
No doubt, sendmail also deserves some criticism.
I wonder how many Linux/Apache systems get web pages defaced via. SQL injection or other PHP related attacks, but do not lead to the box being rooted? Any numbers?
Re:Before the Microsoft defenders say it... (Score:5, Informative)
Although you have good motives in this post, you have no idea what you are talking about in regard to Microsoft's OS architectural security and its history.
Sure Win9x and Win3.x and DOS are INHERENTLY insecure, as they were designed with a closed system architecture in mind and an evolution of a closed system OS. Just like Mac System software has almost no inherent underlying security. (i.e. they were not designed for security or rigid network security since many of the networking concepts that are common today were not available or widely used when they were originally designed in the 80s. As most home users concepts of networks were CompuServe and BBSes.)
However, the NT architecture and security model that it was designed upon had security as a main priority from its original designs. In fact the Object Oriented/Token based security model that is in the NT base (and the original NT 3.1) are not only conceptually more advanced than the *nix security model, but they also have been successfully implemented to be one of the most secure OS designs in history.
The designers of the NT security model took 'conceptual' ideas of the 'ideal' methodologies for a robust and strong underlying security structure and designed these into the OS from day one.
This is why people like Dave Cutler and other 'respected' Unix and OS engineers at the time that were hired by Microsoft ABANDONED the *nix security models to build an OS using the new theories of OS security and implement them in the NT kernel architecture.
As for backing my claims, I suggest an original text like "Inside Windows NT" - The original 1993 release and the recent updated releases that cover the newer NT code bases - Windows 2000, XP, and 2003.
The OS designers at Microsoft had full control to make NT based upon *nix concepts and technologies if that was what they thought was the most advanced conceptual OS engineering; however, they rejected taking the *nix route and instead went for OS architectural concepts that were on the forefront of technological theory and hadn't even been implemented in a real OS to the extent they were in NT.
As you can see from many of my posts here, I am not a hard core Microsoft or NT zealot, but when I see people just dismiss technologies because they take the popular misconceptions I feel the need to respond.
Even if you hate NT and Microsoft, I truly do hope you will explore what TRULY is in NT in terms of security and its security model for your own knowledge.
Especially considering any information you or someone else reading this post gain from it might be compelled to use some of the Microsoft NT concepts in other OS coding and designs to create richer OS environments for everyone, whether it be MacOSX, Linux, or BeOS.
Even if you take odds and dismiss the intellectuals that designed NT, there is always the chance the Microsoft team did do something innovative or right that can also benefit future OS architectural models.
Take Care,
TheNetAvenger
Spam, spam, spam and spam (Score:2, Funny)
Buffer Overflow=same old anti-MS exageration (Score:2)
Well, why is Sendmail's Overflow more "Buff" than Exchange's???
Will its "Buffer" Overflow run on a 64bit processor? Did it get "Buffer" legally, or like so many from the Open Source movement, is it on drugs of some kind that just make it SEEM "Buffer"?
Why would you want your Overflow to be "Buffer" anyways? We should be saving resources as much as possible and overflow is wasteful so
I didn't realize Microsoft wrote sendmail! (Score:3, Funny)
Who cares? (Score:2, Informative)
qmail [cr.yp.to]
postfix [postfix.org]
exim [exim.org]
This was mentioned on bugtraq (Score:2, Informative)
attack details:
Local exploitation on little endian Linux is confirmed to be trivial
via recipient.c and sendtolist(), with a pointer overwrite leading to a
neat case of free() on user-supplied data, i.e.:
eip = 0x40178ae2
edx = 0x41414141
esi = 0x61616161
SEGV in chunk_free (ar_ptr=0x4022a160, p=0x81337e0) at malloc.c:3242
0x40178ae2 : mov %esi,0xc(%edx)
0x40178ae5 : mov %edx,0x8(%esi)
Remote attack is believed to be possible.
It also seems tha
You know... (Score:2, Funny)
OMFG (Score:4, Interesting)
Look I know (Score:3, Funny)
difference between MS bugs and OS bugs (Score:4, Interesting)
Of course that could be because the OS projects fix their bugs as soon as they find them rather than having to wait for the red tape to clear up.
I suspect this story is fradulent (Score:3, Funny)
Why sendmail anyway? (Score:3, Informative)
Sendmail has remote exploits every couple of months at best. Why is anyone suprised any more? It's not as if it's easy to set up, administrate or is horribly high performance. It's about as middle of the road as you get. As many have pointed out before I'm sure, this is exactly why we complain about software from microsoft (and I mean just the software, not it's licences nor the biz tactics associated with it).
So why not look for alternatives, all you sysadmins out here? I for one prefer qmail [cr.yp.to]. There are plenty of others.
I know it's hard to switch to a new system when you've gotten profficent in configuring something well, especially when you are so busy using it that you don't have time to play with something new to see if can work for your setup. But I can't see that running a frequently exploited mail server will cause anything but more work.
This is getting silly (Score:5, Informative)
Especially software that is semi-commercial. They're getting paid to check for these issues, after all.
Ok, credit given where credit is due. The problem has been recognised within a short time of being detected. That's better than Hotmail's "check the password? what for?" bug, that persisted for six or seven months, and remained in effect for several days after the media ran the story.
But that's where the credit ends. It shows that the program isn't being routinely tested and verified with overflow detectors, or (if it is), that the testing procedure is inadequate.
It shows why rival MTAs (eg: Postfix) are gaining popularity, when Sendmail could have kept absolute control of the market, merely by being the best.
Perpetual newpaper (Score:3, Funny)
The headlines were like "Pope Denounces Violence" and "Real Estate Values Rise" and "Unrest in the Middle East". I think that "Buffer Overflow Found in Sendmail" would have been a worthy addition to the Tech Pages.
Sendmail 5th on the list (Score:3)
Vulnerability list [orthus.com]
Re:Sendmail, huh? (Score:2, Informative)
Re:Sendmail, huh? (Score:2)
Re:greaaat (Score:2)
It's just you, because neither SSH nor SMTP have anything to do with the web.
Re:HUH? (Score:2, Funny)
Re:OpenSSH as well (Score:5, Insightful)
It's a paradox that people who are so paranoid when it comes to security (there are no proof of concept remote exploits for either of these holes), would download patches from where ever and who ever.
Posts like the parent ("get latest patch from me!") always get moderated up, so there must be somebody downloading and installing them. Maybe I shouldn't give people ideas.
Re:OpenSSH as well (Score:5, Funny)
Re:OpenSSH as well (Score:4, Insightful)
One of the pluses of open source is that you have the ability to look at the code and determine exactly what the patch changes. For a small patch most sysadmins, even though they might not be an "elite" programmer, can determine that the code does some extra boundary checking or the like.
I would hope that sysadmins do this before installing code from an unknown source.
Re:OpenSSH as well (Score:3, Insightful)
Considering that a lot of mods don't even seem to READ the posts they mod, I doubt they checked out the link.
Re:Can you read? (Score:3, Informative)
Re:OpenSSH as well (Score:4, Informative)
Re:Patch delivery mechanism (Score:3, Informative)
RHN Update Agent [redhat.com]
Re:Patch delivery mechanism (Score:2)
apt-get upgrade [die.net]
Re:Patch delivery mechanism (Score:2, Informative)
Re:Patch delivery mechanism (Score:2)
Unless you're ok with having a seperate server to do your patching for you...
Re:Patch delivery mechanism (Score:2)
Re:Patch delivery mechanism (Score:5, Funny)
> windows that indicates when new patches are available
> for download?
Yup. it's called "slashdot"
Re:Patch delivery mechanism (Score:2)
However, I object to having to pay for free software
Anyone want to get together and work on an open-source auto-update package?
Re:Patch delivery mechanism (Score:3, Informative)
apt-get upgrade
Stick it in a cronjob.
Solved
Re:Patch delivery mechanism (Score:3, Insightful)
apt-get upgrade
Stick it in a cronjob.
Yikes! Remind me to never give you a job as an admin for any of my computers. While that sort of thing might be acceptable for a home desktop, it's suicide on a corporate server...
Re:Patch delivery mechanism (Score:3, Informative)
Debian: apt-get update
Gentoo: emerge sync
RedHat: up2date, or autorpm, or apt-get update
SuSE: you, or autorpm
Mandrake: urpmi update
You can get autorpm to e-mail you a daily summary too.
Re:Patch delivery mechanism (Score:2)
Re:Patch delivery mechanism (Score:2)
Re:Patch delivery mechanism (Score:5, Insightful)
You mean when Microsoft publicly discloses the exploit, usually weeks after it was first reported across the Internet?
Re:I use... (Score:5, Funny)
If you can edit a
Re:What Sendmail security problem? (Score:5, Insightful)
Re:To all the Microsoft bashers out there.... (Score:3, Insightful)