]> Pileus Git - ~andy/fetchmail/blob - fetchmail-SA-2005-01.txt
Attempt merging from 6.3.24.
[~andy/fetchmail] / fetchmail-SA-2005-01.txt
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 fetchmail-SA-2005-01: security announcement
5
6 Topic:          remote code injection vulnerability in fetchmail
7
8 Author:         Matthias Andree
9 Version:        1.04
10 Announced:      2005-07-21
11 Type:           buffer overrun/stack corruption/code injection
12 Impact:         account or system compromise possible through malicious
13                 or compromised POP3 servers
14 Danger:         high: in sensitive configurations, a full system
15                 compromise is possible
16                 (for 6.2.5.1: denial of service for the whole fetchmail
17                 system is possible)
18 CVE Name:       CVE-2005-2335
19 URL:            http://fetchmail.berlios.de/fetchmail-SA-2005-01.txt
20                 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212762
21                 http://www.vuxml.org/freebsd/3497d7be-2fef-45f4-8162-9063751b573a.html
22                 http://www.vuxml.org/freebsd/3f4ac724-fa8b-11d9-afcf-0060084a00e5.html
23                 http://www.freebsd.org/cgi/query-pr.cgi?pr=83805
24                 http://www.heise.de/security/news/meldung/62070
25 Thanks:         Edward J. Shornock (located the bug in UIDL code)
26                 Miloslav Trmac (pointed out 6.2.5.1 was faulty)
27                 Ludwig Nussel (provided minimal correct fix)
28
29 Affects:        fetchmail version 6.2.5.1 (denial of service)
30                 fetchmail version 6.2.5 (code injection)
31                 fetchmail version 6.2.0 (code injection)
32                 (other versions have not been checked)
33
34 Not affected:   fetchmail 6.2.5.2
35                 fetchmail 6.2.5.4
36                 fetchmail 6.3.0
37
38                 Older versions may not have THIS bug, but had been found
39                 to contain other security-relevant bugs.
40
41 Corrected:      2005-07-22 01:37 UTC (SVN) - committed bugfix (r4157)
42                 2005-07-22                   fetchmail-patch-6.2.5.2 released
43                 2005-07-23                   fetchmail-6.2.5.2 tarball released
44                 2005-11-13                   fetchmail-6.2.5.4 tarball released
45                 2005-11-30                   fetchmail-6.3.0 tarball released
46
47 0. Release history
48
49 2005-07-20      1.00 - Initial announcement
50 2005-07-22      1.01 - Withdrew 6.2.5.1 and 6.2.6-pre5, the fix was buggy
51                        and susceptible to denial of service through
52                        single-byte read from 0 when either a Message-ID:
53                        header was empty (in violation of RFC-822/2822)
54                        or the UIDL response did not contain an UID (in
55                        violation of RFC-1939).
56                      - Add Credits.
57                      - Add 6.2.5.1 failure details to sections 2 and 3
58                      - Revise section 5 and B.
59 2005-07-26      1.02 - Revise section 0.
60                      - Add FreeBSD VuXML URL for 6.2.5.1.
61                      - Add heise security URL.
62                      - Mention release of 6.2.5.2 tarball.
63 2005-10-27      1.03 - Update CVE Name after CVE naming change
64 2005-12-08      1.04 - Mention 6.2.5.4 and 6.3.0 releases "not affected"
65                      - remove patch information
66
67 1. Background
68
69 fetchmail is a software package to retrieve mail from remote POP2, POP3,
70 IMAP, ETRN or ODMR servers and forward it to local SMTP, LMTP servers or
71 message delivery agents.
72
73 2. Problem description
74
75 The POP3 code in fetchmail-6.2.5 and older that deals with UIDs (from
76 the UIDL) reads the responses returned by the POP3 server into
77 fixed-size buffers allocated on the stack, without limiting the input
78 length to the buffer size. A compromised or malicious POP3 server can
79 thus overrun fetchmail's stack.  This affects POP3 and all of its
80 variants, for instance but not limited to APOP.
81
82 In fetchmail-6.2.5.1, the attempted fix prevented code injection via
83 POP3 UIDL, but introduced two possible NULL dereferences that can be
84 exploited to mount a denial of service attack.
85
86 3. Impact
87
88 In fetchmail-6.2.5 and older, very long UIDs can cause fetchmail to
89 crash, or potentially make it execute code placed on the stack. In some
90 configurations, fetchmail is run by the root user to download mail for
91 multiple accounts.
92
93 In fetchmail-6.2.5.1, a server that responds with UID lines containing
94 only the article number but no UID (in violation of RFC-1939), or a
95 message without Message-ID when no UIDL support is available, can crash
96 fetchmail.
97
98 4. Workaround
99
100 No reasonable workaround can be offered at this time.
101
102 5. Solution
103
104 Upgrade your fetchmail package to version 6.3.0 or newer.
105
106 <http://developer.berlios.de/project/showfiles.php?group_id=1824>
107
108 A. References
109
110 fetchmail home page: <http://fetchmail.berlios.de/>
111
112 B. Copyright, License and Warranty
113
114 (C) Copyright 2005 by Matthias Andree, <matthias.andree@gmx.de>.
115 Some rights reserved.
116
117 This work is licensed under the
118 Creative Commons Attribution-NoDerivs 3.0 Germany License (CC BY-ND 3.0).
119
120 To view a copy of this license, visit
121 http://creativecommons.org/licenses/by-nd/3.0/de/deed.en
122 or send a letter to:
123
124 Creative Commons
125 444 Castro Street
126 Suite 900
127 MOUNTAIN VIEW, CALIFORNIA 94041
128 USA
129
130 THIS WORK IS PROVIDED FREE OF CHARGE AND WITHOUT ANY WARRANTIES.
131 Use the information herein at your own risk.
132
133 END OF fetchmail-SA-2005-01.txt
134 -----BEGIN PGP SIGNATURE-----
135 Version: GnuPG v1.4.11 (GNU/Linux)
136
137 iEYEARECAAYFAk9/Yg4ACgkQvmGDOQUufZVgGgCfer/s64xaU71GiAQ6bpu5Lrei
138 ysgAnj2MQhFOxIzzw7V9qyp095NotaOO
139 =uLfy
140 -----END PGP SIGNATURE-----