Hello community, here is the log from the commit of package cyrus-imapd for openSUSE:11.3 checked in at Mon Jun 20 17:53:50 CEST 2011. -------- --- old-versions/11.3/UPDATES/all/cyrus-imapd/cyrus-imapd.changes 2010-11-19 10:12:32.000000000 +0100 +++ 11.3/cyrus-imapd/cyrus-imapd.changes 2011-05-23 15:41:29.000000000 +0200 @@ -1,0 +2,6 @@ +Mon May 23 10:06:06 UTC 2011 - rhafer@suse.de + +- Fixed STARTTLS plaintext command injection vulnerability + (bnc#694247, cyrus-bug#3425) + +------------------------------------------------------------------- calling whatdependson for 11.3-i586 New: ---- cyrus-imapd-STARTTLS-plaintext-command-injection.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cyrus-imapd.spec ++++++ --- /var/tmp/diff_new_pack.QhW9cz/_old 2011-06-20 17:52:55.000000000 +0200 +++ /var/tmp/diff_new_pack.QhW9cz/_new 2011-06-20 17:52:55.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package cyrus-imapd (Version 2.3.16) +# spec file for package cyrus-imapd # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -50,7 +50,7 @@ %endif Summary: The Cyrus IMAP and POP Mail Server Version: 2.3.16 -Release: 8.<RELEASE1> +Release: 8.<RELEASE5> Source: %{prjname}-%{version}.tar.bz2 Source1: cyrus-imapd-rc.tar.gz Source2: DB_CONFIG @@ -67,6 +67,7 @@ Patch12: pie.patch Patch18: cyrus-imapd-perl-path.patch Patch19: cron-job-ctl_mboxlist-path.patch +Patch20: cyrus-imapd-STARTTLS-plaintext-command-injection.dif %if %{with_kolab} # KOLAB_cyrus-imapd patches are maintained at @@ -180,6 +181,7 @@ %patch12 -p1 %patch18 %patch19 -p1 +%patch20 -p2 %if %{with_kolab} %patch100 -p1 ++++++ cyrus-imapd-STARTTLS-plaintext-command-injection.dif ++++++
From febfa4a5e2b20521e6176c787b0f05acc05d93e6 Mon Sep 17 00:00:00 2001 From: Ken Murchison
Date: Fri, 25 Mar 2011 11:50:18 -0400 Subject: Fixed bug #3423 - STARTTLS plaintext command injection vulnerability
diff --git a/cyrus/imap/imapd.c b/cyrus/imap/imapd.c index de67b46..a978338 100644 --- a/cyrus/imap/imapd.c +++ b/cyrus/imap/imapd.c @@ -1688,6 +1688,9 @@ void cmdloop() if (c == '\r') c = prot_getc(imapd_in); if (c != '\n') goto extraargs; + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(imapd_in); + /* if we've already done SASL fail */ if (imapd_userid != NULL) { prot_printf(imapd_out, diff --git a/cyrus/imap/lmtpengine.c b/cyrus/imap/lmtpengine.c index eff3e50..16ccc54 100644 --- a/cyrus/imap/lmtpengine.c +++ b/cyrus/imap/lmtpengine.c @@ -1562,6 +1562,9 @@ void lmtpmode(struct lmtp_func *func, sasl_ssf_t ssf; char *auth_id; + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(pin); + /* SASL and openssl have different ideas about whether ssf is signed */ layerp = (int *) &ssf; diff --git a/cyrus/imap/mupdate.c b/cyrus/imap/mupdate.c index b6cc1cb..a4f6509 100644 --- a/cyrus/imap/mupdate.c +++ b/cyrus/imap/mupdate.c @@ -927,6 +927,9 @@ mupdate_docmd_result_t docmd(struct conn *c) if (!strcmp(c->cmd.s, "Starttls")) { CHECKNEWLINE(c, ch); + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(c->pin); + if (!tls_enabled()) { /* we don't support starttls */ goto badcmd; diff --git a/cyrus/imap/nntpd.c b/cyrus/imap/nntpd.c index 1c9dbb1..105fa4b 100644 --- a/cyrus/imap/nntpd.c +++ b/cyrus/imap/nntpd.c @@ -1428,6 +1428,9 @@ static void cmdloop(void) if (c == '\r') c = prot_getc(nntp_in); if (c != '\n') goto extraargs; + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(nntp_in); + cmd_starttls(0); } else if (!strcmp(cmd.s, "Stat")) { diff --git a/cyrus/imap/pop3d.c b/cyrus/imap/pop3d.c index b84ca2e..7303771 100644 --- a/cyrus/imap/pop3d.c +++ b/cyrus/imap/pop3d.c @@ -930,6 +930,9 @@ static void cmdloop(void) if (arg) { prot_printf(popd_out, "-ERR Unexpected extra argument\r\n"); } else { + /* XXX discard any input pipelined after STLS */ + prot_flush(popd_in); + cmd_starttls(0); } } diff --git a/cyrus/imap/sync_server.c b/cyrus/imap/sync_server.c index b2f0a7b..b8b4263 100644 --- a/cyrus/imap/sync_server.c +++ b/cyrus/imap/sync_server.c @@ -904,6 +904,9 @@ static void cmdloop(void) if (c == '\r') c = prot_getc(sync_in); if (c != '\n') goto extraargs; + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(sync_in); + /* if we've already done SASL fail */ if (sync_userid != NULL) { prot_printf(sync_out, diff --git a/cyrus/lib/prot.c b/cyrus/lib/prot.c index 4fef8e3..1f06fc4 100644 --- a/cyrus/lib/prot.c +++ b/cyrus/lib/prot.c @@ -728,10 +728,29 @@ int prot_fill(struct protstream *s) } /* + * If 's' is an input stream, discard any pending/buffered data. Otherwise, * Write out any buffered data in the stream 's' */ int prot_flush(struct protstream *s) { + if (!s->write) { + int c, save_dontblock = s->dontblock; + + /* Set stream to nonblocking mode */ + if (!save_dontblock) nonblock(s->fd, (s->dontblock = 1)); + + /* Ingest any pending input */ + while ((c = prot_fill(s)) != EOF); + + /* Reset stream to previous blocking mode */ + if (!save_dontblock) nonblock(s->fd, (s->dontblock = 0)); + + /* Discard any buffered input */ + s->cnt = 0; + + return 0; + } + return prot_flush_internal(s, 1); } diff --git a/cyrus/timsieved/parser.c b/cyrus/timsieved/parser.c index 49b2881..dc710c0 100644 --- a/cyrus/timsieved/parser.c +++ b/cyrus/timsieved/parser.c @@ -443,6 +443,9 @@ int parser(struct protstream *sieved_out, struct protstream *sieved_in) goto error; } + /* XXX discard any input pipelined after STARTTLS */ + prot_flush(sieved_in); + if(referral_host) goto do_referral; -- 1.7.3.4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org