[Bug 290901] Re: [SRU] for broken header parser
Mathias Gug
mathiaz at ubuntu.com
Fri Nov 7 01:44:10 GMT 2008
I've attached a python script that triggers the problem.
** Summary changed:
- Update to 1.1.6 - important fix for broken header parser
+ [SRU] for broken header parser
** Description changed:
Dovecot 1.1.6 has just be released fixing an important bug:
The invalid message address parsing bug is pretty important since it
allows a remote user to send broken mail headers and prevent the
recipient from accessing the mailbox afterwards, because the process
will always just crash trying to parse the header. This is assuming that
the IMAP client uses FETCH ENVELOPE command, not all do. Note that it
doesn't affect versions older than v1.1.4.
+ dovecot -n and -a now prints some system information at the top.
+ More error/debug message logging improvements.
- pop3-login: Fixed assert-crash if a client sent USER+PASS+USER+PASS
commands in the same IP packet.
- Parsing an invalid message address like "From: (" caused an
assert-crash in v1.1.4 and v1.1.5.
- Folding whitespace wasn't handled correctly inside quoted-strings,
causing some messages to be parsed incorrectly.
- mbox: Fixed saving messages that begin with a valid From_-line.
Only intrepid is affected.
+
+ SRU Process
+ ========
+
+ Impact
+ ---------
+ As stated in the release notes:
+
+ allows a remote user to send broken mail headers and prevent the
+ recipient from accessing the mailbox afterwards, because the process
+ will always just crash trying to parse the header. This is assuming that
+ the IMAP client uses FETCH ENVELOPE command, not all do.
+
+ Patch
+ --------
+
+ One line patch taken from the upstream repository:
+ http://hg.dovecot.org/dovecot-1.1/raw-rev/48840b2d4b18
+
+ --- a/src/lib-mail/message-address.c Thu Oct 23 18:58:22 2008 +0300
+ +++ b/src/lib-mail/message-address.c Fri Oct 24 01:56:13 2008 +0300
+ @@ -314,8 +314,7 @@ message_address_parse_real(pool_t pool,
+ ctx.str = t_str_new(128);
+ ctx.fill_missing = fill_missing;
+
+ - ret = rfc822_skip_lwsp(&ctx.parser);
+ - if (ret == 0) {
+ + if (rfc822_skip_lwsp(&ctx.parser) <= 0) {
+ /* no addresses */
+ return NULL;
+ }
+
+ How-to reproduce the bug
+ ---------------------------------
+ Send an email with a From header starting with a ( and that doesn't have a ). Issue a FETCH ENVELOPE command.
+ Expected result:
+ Headers containing the envolope of the message.
+ Actual result:
+ The imap server closes the connection. There is an assertion failure in the log on the server.
+
+ The qa-regression-testing dovecot script has been updated with a test case to cover this bug:
+ http://bazaar.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master/revision/228
** Attachment added: "test_imap.py"
http://launchpadlibrarian.net/19444857/test_imap.py
** Changed in: dovecot (Ubuntu Intrepid)
Assignee: (unassigned) => Mathias Gug (mathiaz)
Status: New => Fix Committed
--
[SRU] for broken header parser
https://bugs.launchpad.net/bugs/290901
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dovecot in ubuntu.
More information about the Ubuntu-server-bugs
mailing list