论坛: UNIX系统 标题: FreeBSD_sendmail_header_parsing_buffer_overflow_patch_available 复制本贴地址    
作者: cimsxiyang [cimsxiyang]    版主   登录
代码:

ISS has identified a buffer overflow that may occur during header parsing in all versions of sendmail after version 5.79. In addition, Sendmail, Inc. has identified and corrected a defect in buffer handling within sendmail's RFC 1413 ident protocol support. Various solutions and patches are now available for FreeBSD.

[Full advisory, solutions and patches]
--------------------------------------------------------------------------------
From: FreeBSD Security Advisories <security-advisories@freebsd.org> 
To: FreeBSD Security Advisories <security-advisories@freebsd.org> 
Date: Mon, March 3, 2003 10:11 am 
Subject: FreeBSD Security Advisory FreeBSD-SA-03:04.sendmail 

--------------------------------------------------------------------------------

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

==================================================
===========================
FreeBSD-SA-03:04.sendmail Security Advisory
The FreeBSD Project

Topic: sendmail header parsing buffer overflow

Category: contrib
Module: contrib_sendmail
Announced: 2003-03-03
Credits: Mark Dowd (ISS)
Affects: All releases prior to 4.8-RELEASE and 5.0-RELEASE-p4
FreeBSD 4-STABLE prior to the correction date
Corrected: 2003-03-03
FreeBSD only: NO

I. Background

FreeBSD includes sendmail(8), a general purpose internetwork mail
routing facility, as the default Mail Transfer Agent (MTA).

II. Problem Description

ISS has identified a buffer overflow that may occur during header
parsing in all versions of sendmail after version 5.79.

In addition, Sendmail, Inc. has identified and corrected a defect in
buffer handling within sendmail's RFC 1413 ident protocol support.

III. Impact

A remote attacker could create a specially crafted message that may
cause sendmail to execute arbitrary code with the privileges of the
user running sendmail, typically root. The malicious message might be
handled (and therefore the vulnerability triggered) by the initial
sendmail MTA, any relaying sendmail MTA, or by the delivering sendmail
process. Exploiting this defect is particularly difficult, but is
believed to be possible.

The defect in the ident routines is not believed to be exploitable.

IV. Workaround

There is no workaround, other than disabling sendmail.

V. Solution

Do one of the following:

1) Upgrade your vulnerable system to 4-STABLE; or to the RELENG_5_0,
RELENG_4_7, or RELENG_4_6 security branch dated after the correction
date (5.0-RELEASE-p4, 4.7-RELEASE-p7, or 4.6.2-RELEASE-p10,
respectively).

[NOTE: At the time of this writing, the FreeBSD 4-STABLE branch is
labeled `4.8-RC1'.]

2) To patch your present system:

The following patch has been verified to apply to FreeBSD 5.0, 4.7,
and 4.6 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

ftp://ftp.FreeBSD.org/pub/FreeBSD/C.../sendmail.patch
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...dmail.patch.asc

b) Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch
# cd /usr/src/lib/libsm
# make obj && make depend && make
# cd /usr/src/lib/libsmutil
# make obj && make depend && make
# cd /usr/src/usr.sbin/sendmail
# make obj && make depend && make && make install

3) For i386 systems only, a patched sendmail binary is available.
Select the correct binary based on your FreeBSD version and whether or
not you want STARTTLS support. If you want STARTTLS support, you must
have the crypto distribution installed.

a) Download the relevant binary from the location below, and verify
the detached PGP signature using your PGP utility.

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...6-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...6-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...6-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/C...nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/C...ypto.bin.gz.asc

b) Install the binary. Execute the following commands as root.
Note that these examples utilizes the FreeBSD 4.7 crypto binary.
Substitute BINARYGZ with the file name which you downloaded in
step (a).

# BINARYGZ=/path/to/sendmail-4.7-i386-crypto.bin.gz
# gunzip ${BINARYGZ}
# install -s -o root -g smmsp -m 2555 ${BINARYGZ%.gz} /usr/libexec/sendmail/sendmail

c) Restart sendmail. Execute the following command as root.

# /bin/sh /etc/rc.sendmail restart

VI. Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

Path Revision
Branch
- -------------------------------------------------------------------------
src/contrib/src/sendmail.h
src/contrib/sendmail/src/daemon.c
src/contrib/sendmail/src/headers.c
src/contrib/sendmail/src/main.c
src/contrib/sendmail/src/parseaddr.c
- -------------------------------------------------------------------------

VII. References

<URL: http://www.kb.cert.org/vuls/id/398025 >
<URL: http://www.iss.net/issEn/delivery/x...l.jsp?oid=21950 >
<URL: http://www.cve.mitre.org/cgi-bin/cv...e=CAN-2002-1337 >
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+Y4sVFdaIBMps37IRAudhAJ9eOnD1h6UOANKPpD4OW7
lTk3tjnwCfV4sW
1KK2fkVaPFNIDC7VEPh+Aew=
=lWwz
-----END PGP SIGNATURE-----

This is the moderated mailing list freebsd-announce.
The list contains announcements of new FreeBSD capabilities,
important events and project milestones.
See also the FreeBSD Web pages at http://www.freebsd.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-announce" in the body of the messa



中文: http://community.freebsdchina.org/document.php?topic=1949&forum=28


[此贴被 夕阳(cimsxiyang) 在 03月06日16时26分 编辑过]

地主 发表时间: 2003-03-06 16:20:26

回复: NetDemon [netdemon]   ADMIN   登录
哇靠~~~~~~~~~~`
这个玩笑开大了,我于3月3日晚上make world
现在要我重来一次,他奶奶的,气死我了~~~~~~~

B1层 发表时间: 03/06 18:13

回复: NetDemon [netdemon]   ADMIN   登录
代码:

ns8# cvsup -h cvsup2.freebsd.org stable-supfile
Connected to cvsup2.freebsd.org
Updating collection src-all/cvs
 Edit src/Makefile.inc1
 Edit src/bin/ln/symlink.7
 Edit src/bin/ls/ls.1
 Edit src/contrib/sendmail/FREEBSD-upgrade
 Edit src/contrib/sendmail/PGPKEYS
 Edit src/contrib/sendmail/RELEASE_NOTES
 Edit src/contrib/sendmail/cf/README
 Edit src/contrib/sendmail/cf/cf/submit.cf
 Edit src/contrib/sendmail/cf/m4/version.m4
 Edit src/contrib/sendmail/cf/ostype/bsd4.4.m4
 Edit src/contrib/sendmail/contrib/bitdomain.c
 Edit src/contrib/sendmail/doc/op/op.me
 Edit src/contrib/sendmail/libmilter/comm.c
 Edit src/contrib/sendmail/libmilter/docs/smfi_setreply.html
 Edit src/contrib/sendmail/libmilter/handler.c
 Edit src/contrib/sendmail/libmilter/libmilter.h
 Edit src/contrib/sendmail/libmilter/listener.c
 Edit src/contrib/sendmail/libmilter/main.c
 Edit src/contrib/sendmail/libsm/stdio.c
 Edit src/contrib/sendmail/libsmdb/smdb2.c
 Edit src/contrib/sendmail/mail.local/mail.local.c
 Edit src/contrib/sendmail/makemap/makemap.c
 Edit src/contrib/sendmail/praliases/praliases.c
 Edit src/contrib/sendmail/smrsh/smrsh.c
 Edit src/contrib/sendmail/src/README
 Edit src/contrib/sendmail/src/TUNING
 Edit src/contrib/sendmail/src/conf.c
 Edit src/contrib/sendmail/src/conf.h
 Edit src/contrib/sendmail/src/daemon.c
 Edit src/contrib/sendmail/src/deliver.c
 Edit src/contrib/sendmail/src/domain.c
 Edit src/contrib/sendmail/src/err.c
 Edit src/contrib/sendmail/src/headers.c
 Edit src/contrib/sendmail/src/main.c
 Edit src/contrib/sendmail/src/mci.c
 Edit src/contrib/sendmail/src/milter.c
 Edit src/contrib/sendmail/src/parseaddr.c
 Edit src/contrib/sendmail/src/queue.c
 Edit src/contrib/sendmail/src/savemail.c
 Edit src/contrib/sendmail/src/sendmail.h
 Edit src/contrib/sendmail/src/srvrsmtp.c
 Edit src/contrib/sendmail/src/tls.c
 Edit src/contrib/sendmail/src/version.c
 Edit src/contrib/tcpdump/CHANGES
 Edit src/contrib/tcpdump/CREDITS
 Edit src/contrib/tcpdump/FILES
 Edit src/contrib/tcpdump/INSTALL
 Edit src/contrib/tcpdump/README
 Edit src/contrib/tcpdump/VERSION
 Edit src/contrib/tcpdump/addrtoname.c
 Edit src/contrib/tcpdump/config.h.in
 Edit src/contrib/tcpdump/configure
 Edit src/contrib/tcpdump/configure.in
 Delete src/contrib/tcpdump/dhcp6.h
 Delete src/contrib/tcpdump/dhcp6opt.h
 Edit src/contrib/tcpdump/gmt2local.c
 Edit src/contrib/tcpdump/interface.h
 Edit src/contrib/tcpdump/print-802_11.c
 Edit src/contrib/tcpdump/print-arcnet.c
 Edit src/contrib/tcpdump/print-arp.c
 Edit src/contrib/tcpdump/print-atalk.c
 Edit src/contrib/tcpdump/print-beep.c
 Edit src/contrib/tcpdump/print-bgp.c
 Edit src/contrib/tcpdump/print-bootp.c
 Edit src/contrib/tcpdump/print-dhcp6.c
 Edit src/contrib/tcpdump/print-egp.c
 Edit src/contrib/tcpdump/print-esp.c
 Edit src/contrib/tcpdump/print-ether.c
 Edit src/contrib/tcpdump/print-fddi.c
 Edit src/contrib/tcpdump/print-gre.c
 Edit src/contrib/tcpdump/print-icmp.c
 Edit src/contrib/tcpdump/print-icmp6.c
 Edit src/contrib/tcpdump/print-igmp.c
 Edit src/contrib/tcpdump/print-ip.c
 Edit src/contrib/tcpdump/print-isakmp.c
 Edit src/contrib/tcpdump/print-isoclns.c
 Edit src/contrib/tcpdump/print-l2tp.c
 Edit src/contrib/tcpdump/print-mobile.c
 Edit src/contrib/tcpdump/print-mpls.c
 Edit src/contrib/tcpdump/print-nfs.c
 Edit src/contrib/tcpdump/print-ntp.c
 Edit src/contrib/tcpdump/print-null.c
 Edit src/contrib/tcpdump/print-pim.c
 Edit src/contrib/tcpdump/print-radius.c
 Edit src/contrib/tcpdump/print-raw.c
 Edit src/contrib/tcpdump/print-rx.c
 Edit src/contrib/tcpdump/print-sctp.c
 Edit src/contrib/tcpdump/print-sll.c
 Edit src/contrib/tcpdump/print-smb.c
 Edit src/contrib/tcpdump/print-snmp.c
 Edit src/contrib/tcpdump/print-stp.c
 Edit src/contrib/tcpdump/print-sunrpc.c
 Edit src/contrib/tcpdump/print-zephyr.c
 Edit src/contrib/tcpdump/smbutil.c
 Edit src/contrib/tcpdump/util.c
 Edit src/etc/Makefile
 Edit src/include/pthread.h
 Edit src/lib/libc_r/man/Makefile.inc
 Edit src/lib/libc_r/man/pthread_attr.3
 Edit src/lib/libc_r/man/pthread_attr_get_np.3
 Checkout src/lib/libc_r/man/pthread_attr_setcreatesuspend_np.3
 Checkout src/lib/libc_r/man/pthread_main_np.3
 Checkout src/lib/libc_r/man/pthread_multi_np.3
 Checkout src/lib/libc_r/man/pthread_mutexattr_getkind_np.3
 Checkout src/lib/libc_r/man/pthread_resume_all_np.3
 Checkout src/lib/libc_r/man/pthread_resume_np.3
 Checkout src/lib/libc_r/man/pthread_set_name_np.3
 Checkout src/lib/libc_r/man/pthread_suspend_all_np.3
 Checkout src/lib/libc_r/man/pthread_suspend_np.3
 Checkout src/lib/libc_r/man/pthread_switch_add_np.3
 Edit src/lib/libc_r/uthread/Makefile.inc
 Checkout src/lib/libc_r/uthread/uthread_attr_getstack.c
 Checkout src/lib/libc_r/uthread/uthread_attr_setstack.c
 Edit src/release/doc/en_US.ISO8859-1/errata/article.sgml
 Edit src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml
 Edit src/release/doc/share/sgml/release.ent
 Checkout src/release/scripts/checkindex.pl
 Checkout src/release/scripts/mkpkghier
 Edit src/release/scripts/print-cdrom-packages.sh
 Edit src/release/sysinstall/dist.c
 Edit src/release/sysinstall/index.c
 Edit src/sbin/ipfw/ipfw2.c
 Edit src/sbin/mknod/mknod.8
 Edit src/share/examples/cvsup/cvs-supfile
 Edit src/share/man/man4/Makefile
 Edit src/share/man/man4/atapicam.4
 Edit src/share/man/man4/ciss.4
 Edit src/share/man/man4/fwe.4
 Edit src/share/man/man4/fwohci.4
 Edit src/share/man/man4/gif.4
 Edit src/share/man/man4/ida.4
 Edit src/share/man/man4/iir.4
 Edit src/share/man/man4/wi.4
 Edit src/share/misc/pci_vendors
 Edit src/sys/alpha/conf/GENERIC
 Edit src/sys/dev/ata/atapi-cam.c
 Edit src/sys/dev/usb/if_aue.c
 Edit src/sys/dev/usb/ohci.c
 Edit src/sys/kern/uipc_usrreq.c
 Edit src/sys/pci/if_dc.c
 Edit src/sys/pci/if_pcn.c
 Edit src/sys/pci/if_rl.c
 Edit src/sys/pci/if_rlreg.h
 Edit src/sys/pci/if_sis.c
 Edit src/sys/pci/if_sk.c
 Edit src/sys/pci/if_wb.c
 Edit src/sys/pci/if_wx.c
Finished successfully
ns8# 


果然Sendmail更新了,隔了2天,靠~~~~~~~~~~

B2层 发表时间: 03/06 18:27

回复: cimsxiyang [cimsxiyang]   版主   登录
代码:

据CERT/CC称,目前还没有出现存在攻击可能性的代码(邮件),但近期极有可能出现。如果出现攻击用代码,即使是没有专业知识的Script Kiddie(指只依赖工具进行攻击的黑客)也可以进行攻击。因此在出现攻击用代码之前,邮件服务器管理员必须采取对策。


不知道又有多少人落难。:)

B3层 发表时间: 03/06 18:33

论坛: UNIX系统

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号