aboutsummaryrefslogtreecommitdiff
path: root/share/security/advisories/FreeBSD-SA-03:04.sendmail.asc
blob: 38e1b1ab97626af2dd99690160f5b8b78b7df9fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
-----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
Revised:        2003-03-04
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 18:03:18 UTC (RELENG_4)
                2003-03-03 17:19:49 UTC (RELENG_5_0)
                2003-03-03 17:20:23 UTC (RELENG_4_7)
                2003-03-03 17:21:58 UTC (RELENG_4_6)
                2003-03-03 17:22:07 UTC (RELENG_4_5)
                2003-03-03 17:22:16 UTC (RELENG_4_4)
                2003-03-03 17:22:26 UTC (RELENG_4_3)
                2003-03-03 17:23:11 UTC (RELENG_3)
FreeBSD only:   NO

0.   Revision History

v1.0  2003-03-03  Initial release
v1.1  2003-03-04  Added correction details for each branch.

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 not using 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/CERT/patches/SA-03:04/sendmail.patch
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail.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

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

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

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/CERT/patches/SA-03:04/sendmail-4.6-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-nocrypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-nocrypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-nocrypto.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.

Branch                                                           Revision
  Path
- -------------------------------------------------------------------------
RELENG_4
  src/contrib/sendmail/FREEBSD-upgrade                           1.1.2.15
  src/contrib/sendmail/PGPKEYS                                1.1.1.1.2.5
  src/contrib/sendmail/RELEASE_NOTES                         1.1.1.3.2.14
  src/contrib/sendmail/cf/README                             1.1.1.3.2.14
  src/contrib/sendmail/cf/cf/submit.cf                        1.1.1.1.2.7
  src/contrib/sendmail/cf/m4/version.m4                      1.1.1.3.2.14
  src/contrib/sendmail/cf/ostype/bsd4.4.m4                        1.3.6.2
  src/contrib/sendmail/contrib/bitdomain.c                        1.2.6.2
  src/contrib/sendmail/doc/op/op.me                          1.1.1.3.2.14
  src/contrib/sendmail/libmilter/comm.c                       1.1.1.1.2.8
  src/contrib/sendmail/libmilter/docs/smfi_setreply.html      1.1.1.1.2.3
  src/contrib/sendmail/libmilter/handler.c                    1.1.1.1.2.6
  src/contrib/sendmail/libmilter/libmilter.h                  1.1.1.1.2.9
  src/contrib/sendmail/libmilter/listener.c                  1.1.1.1.2.11
  src/contrib/sendmail/libmilter/main.c                       1.1.1.1.2.9
  src/contrib/sendmail/libsm/stdio.c                          1.1.1.1.2.4
  src/contrib/sendmail/libsmdb/smdb2.c                        1.1.1.1.2.8
  src/contrib/sendmail/mail.local/mail.local.c                   1.6.6.13
  src/contrib/sendmail/makemap/makemap.c                          1.3.6.6
  src/contrib/sendmail/praliases/praliases.c                      1.3.6.7
  src/contrib/sendmail/smrsh/smrsh.c                             1.3.6.11
  src/contrib/sendmail/src/README                            1.1.1.3.2.13
  src/contrib/sendmail/src/TUNING                             1.1.1.1.2.3
  src/contrib/sendmail/src/conf.c                                1.5.2.13
  src/contrib/sendmail/src/conf.h                                1.6.2.13
  src/contrib/sendmail/src/daemon.c                          1.1.1.3.2.12
  src/contrib/sendmail/src/deliver.c                         1.1.1.3.2.13
  src/contrib/sendmail/src/domain.c                           1.1.1.3.2.8
  src/contrib/sendmail/src/err.c                                  1.3.6.7
  src/contrib/sendmail/src/headers.c                              1.4.2.9
  src/contrib/sendmail/src/main.c                            1.1.1.3.2.14
  src/contrib/sendmail/src/mci.c                                 1.3.6.10
  src/contrib/sendmail/src/milter.c                          1.1.1.1.2.15
  src/contrib/sendmail/src/parseaddr.c                       1.1.1.2.6.12
  src/contrib/sendmail/src/queue.c                           1.1.1.3.2.13
  src/contrib/sendmail/src/savemail.c                            1.4.2.10
  src/contrib/sendmail/src/sendmail.h                        1.1.1.4.2.14
  src/contrib/sendmail/src/srvrsmtp.c                        1.1.1.2.6.13
  src/contrib/sendmail/src/tls.c                              1.1.1.1.2.4
  src/contrib/sendmail/src/version.c                         1.1.1.3.2.14
RELENG_5_0
  src/UPDATING                                                  1.229.2.9
  src/contrib/sendmail/src/daemon.c                          1.1.1.14.2.1
  src/contrib/sendmail/src/headers.c                             1.12.2.1
  src/contrib/sendmail/src/main.c                            1.1.1.15.2.1
  src/contrib/sendmail/src/parseaddr.c                       1.1.1.14.2.1
  src/contrib/sendmail/src/sendmail.h                        1.1.1.17.2.1
  src/sys/conf/newvers.sh                                        1.48.2.5
RELENG_4_7
  src/UPDATING                                              1.73.2.74.2.9
  src/contrib/sendmail/src/daemon.c                      1.1.1.3.2.10.2.1
  src/contrib/sendmail/src/headers.c                          1.4.2.7.2.1
  src/contrib/sendmail/src/main.c                        1.1.1.3.2.12.2.1
  src/contrib/sendmail/src/parseaddr.c                   1.1.1.2.6.10.2.1
  src/contrib/sendmail/src/sendmail.h                    1.1.1.4.2.12.2.1
  src/sys/conf/newvers.sh                                   1.44.2.26.2.9
RELENG_4_6
  src/UPDATING                                             1.73.2.68.2.37
  src/contrib/sendmail/src/daemon.c                       1.1.1.3.2.8.2.1
  src/contrib/sendmail/src/headers.c                          1.4.2.6.2.1
  src/contrib/sendmail/src/main.c                         1.1.1.3.2.9.2.1
  src/contrib/sendmail/src/parseaddr.c                    1.1.1.2.6.8.2.1
  src/contrib/sendmail/src/sendmail.h                     1.1.1.4.2.9.2.1
  src/sys/conf/newvers.sh                                  1.44.2.23.2.27
RELENG_4_5
  src/UPDATING                                             1.73.2.50.2.41
  src/contrib/sendmail/src/daemon.c                       1.1.1.3.2.6.4.1
  src/contrib/sendmail/src/headers.c                          1.4.2.5.4.1
  src/contrib/sendmail/src/main.c                         1.1.1.3.2.6.4.1
  src/contrib/sendmail/src/parseaddr.c                    1.1.1.2.6.6.4.1
  src/contrib/sendmail/src/sendmail.h                     1.1.1.4.2.7.4.1
  src/sys/conf/newvers.sh                                  1.44.2.20.2.26
RELENG_4_4
  src/UPDATING                                             1.73.2.43.2.40
  src/contrib/sendmail/src/daemon.c                       1.1.1.3.2.6.2.1
  src/contrib/sendmail/src/headers.c                          1.4.2.5.2.1
  src/contrib/sendmail/src/main.c                         1.1.1.3.2.6.2.1
  src/contrib/sendmail/src/parseaddr.c                    1.1.1.2.6.6.2.1
  src/contrib/sendmail/src/sendmail.h                     1.1.1.4.2.7.2.1
  src/sys/conf/newvers.sh                                  1.44.2.17.2.32
RELENG_4_3
  src/UPDATING                                             1.73.2.28.2.29
  src/contrib/sendmail/src/daemon.c                       1.1.1.3.2.4.2.1
  src/contrib/sendmail/src/headers.c                          1.4.2.4.2.1
  src/contrib/sendmail/src/main.c                         1.1.1.3.2.4.2.1
  src/contrib/sendmail/src/parseaddr.c                    1.1.1.2.6.4.2.1
  src/contrib/sendmail/src/sendmail.h                     1.1.1.4.2.4.2.1
  src/sys/conf/newvers.sh                                  1.44.2.14.2.20
RELENG_3
  src/contrib/sendmail/src/daemon.c                           1.1.1.2.2.2
  src/contrib/sendmail/src/headers.c                              1.3.2.2
  src/contrib/sendmail/src/main.c                             1.1.1.2.2.2
  src/contrib/sendmail/src/parseaddr.c                        1.1.1.2.2.1
- -------------------------------------------------------------------------

VII. References

<URL: http://www.kb.cert.org/vuls/id/398025 >
<URL: http://www.iss.net/issEn/delivery/xforce/alerts.jsp?type=Advisories >
<URL: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1337 >
<URL: http://www.sendmail.org/8.12.8.html >
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+ZOcUFdaIBMps37IRAkunAJwO8ydi9lqBz0C7Rx2KQnspXehBkACfVTxs
1uOVHk3rXuMEgmwRoXoEKkA=
=IwY2
-----END PGP SIGNATURE-----