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)
OpenSSH as well (Score:1, Informative)
They missed a few from yesterday.
http://www.flyingbuttmonkeys.com/ssh/ [flyingbuttmonkeys.com]
has a few RPMS (9/8/7.3) i just compiled to patch the problem.. (backported).. THe SRPM is also available for those unwilling to trust my patching efforts.
Or you can wait a few hours for official redhat releases.
It's on the site now (Score:5, Informative)
I've already downloaded and installed it. Thank goodness for Slackbuild scripts
Re:Sendmail, huh? (Score:2, Informative)
Lazy Story Submitter (Score:4, Informative)
Aight... I'll fill in the blanks
ftp://ftp.sendmail.org/pub/sendmail/RELEASE_NOTE S
Re:Patch delivery mechanism (Score:1, Informative)
No, it just has intelligent users and a trace level of OS level bugs
Re:Patch delivery mechanism (Score:3, Informative)
RHN Update Agent [redhat.com]
Re:Patch delivery mechanism (Score:2, Informative)
Re:OpenSSH as well (Score:4, Informative)
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:Patch delivery mechanism (Score:3, Informative)
apt-get upgrade
Stick it in a cronjob.
Solved
Re:"Email Different" (Score:3, Informative)
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 that a CS student from the university of Sweden has posted a working exploit on this [ctrl-c.liu.se] web site. Scary stuff. So patch your system, people!
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:*cough* (Score:3, Informative)
Re:OpenSSH as well (Score:1, Informative)
Re:*cough* (Score:2, Informative)
Re:Patch delivery mechanism (Score:2, Informative)
And if you don't mind this, you can always use the "testing" or "unstable" branches for cutting-edge software.
Besides the fact that Debian is extremely easy to update:
apt-get update
apt-get upgrade
Know what you are talking about before you speak.
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:How does an overflow work? [+LINK] (Score:2, Informative)
It is a story about a detailed PDF on MacOSX/Darwin+PPC specific ways to run malignant code once and if an exploit is found. The posting is somewhat misleading, the PDF is not about vulnerabilities at all but what to do once they are found, as some reply clarifies.
I am pretty sure that similar docs exist for Linux+i386 and a-plenty of other architectures (MS Wind anyone?).
Dani++
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.
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.
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: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.
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:Patch delivery mechanism (Score:2, Informative)
Well, a little explanation time here. Linux is the OS...the kernel. This patch is NOT for Linux. It is a patch for a problem in an independent application that you can run on Linux or other Unix type systems.
This is an important distinction from Windows, where most all the important apps that run on windows are also made by MS..and tightly integrated and dependent on each other. Since the OS and the app. comes from the same source, and the OS and app are often dependent on each other in code sharing...the concept of patching the OS/application is blurred in the MS case, whereas the OS and the application are independent from each other for the most part on a Linux OS based system. So, in general, there can be no ONE auto-update because each part usually comes from different sources.
Now, with that being said, many distributions, such as with RedHat, since they bundle a lot of the apps with the OS in their package...they do have 'auto update' functionality that will warn you to update if you choose to have this turned on in your system. I don't think most people want to AUTO update...especially on servers, but, it IS nice to have messages to tell you they are available and needed. That way, you can look into the problem and the options, and tell them to run.
Also, with one distro, Gentoo, they have all the apps and OS stuff in a downloadable tree structure called portage. Portage is used whenever you want to install an application generally...you do 'emerge (app name)', and off it goes to download the source, take care of lib dependencies...compiles and installs it.
Gentoo tries to keep the latest versions available for all apps...so, the neat thing is, you can do emerge -u world if you want, and it will update everything to the latest version (I prefer to update things as needed)...so, when a version is put out to foil an exploit..just update it..and your good to go.
HTH to make a little distinction with reference to the question...
cayenne8
Re:To all the Microsoft bashers out there.... (Score:2, Informative)
emerge (Gentoo)
up2date (Redhat)
apt-get (Debian)
I know on the Gentoo side, they had the SSH fix out the same day. There are distribution methods in place, just depends on the distro you use. So just cause Windows Update notifies you that there's an update or even does it automatically, that doesn't stop you from croning the above commands.
Re:difference between MS bugs and OS bugs (Score:2, Informative)
Exploit already known half a year ago?! (Score:1, Informative)
http://ftp.pg.gda.pl/pub/software/sendmail/
Isn't it the same as this bug? BUT LOOK AT THE DATE! It was written in march. Has this bug been known for half a year?
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
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 their system internally consistent and trying to please their users!
I've heard great things about qmail, it's great that is available with source for no cost. But it's proprietary software, putting me at the mercy of Bernstein. If you want someone else to maintain a fork with features you desire, you're out of luck. It's fine if you're willing to accept that, but it's not acceptable to everyone. Fortunately there are other [exim.org] options [postfix.org] available.
patch applies to old versions of sendmail (Score:2, Informative)
Not like anyone is going to find this comment so late in the discussion, but...
qmail install HOWTO and RPMs (Score:3, Informative)
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)
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 happy with it.
Re:Can you read? (Score:3, Informative)
You should do that no matter who you download it from, even from the original site, not that long ago the OpenBSD sites, and the GNU sites we're compromised. So just assuming they had good source, wasn't safe. Then at least you know that whoever wrote the patch, also has the private key of whoever signed it (which hopefully is the person whom you trust). If you are a good little author, you sign with a private key on a machine that you sneaker net the source code to, sign there, then sneaker net it back to the public network (or you just drag the MD5SUM there, instead of the original source). At no point, would you ever put the private key on a machine that has ever been connected to the internet (then you just have to physically secure the machine). It's much, much safer that way. Then nobody can get your key except by crytoanalysis, which needs the force of a major gov't behind it to break 4096 PGP encryption last time I checked.
Honest, I'm not as stupid as you think I am.
Kirby