Your message dated Wed, 15 Aug 2007 22:39:23 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#426077: fixed in mpop 1.0.5-1etch1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: mpop
Version: 1.0.5-1

Julien, could you take care of adding this and pushing it through etch
security? My laptop died and I can't build this myself.

Thanks.

---------- Forwarded message ----------
From: Martin Lambers <[EMAIL PROTECTED]>
Date: 29-Apr-2007 21:11
Subject: Re: Patch for mpop-1.0.5 to fix the APOP weakness
To: Carlos Martín Nieto <[EMAIL PROTECTED]>
Cc: Julien Louis <[EMAIL PROTECTED]>


This is an updated patch to fix the APOP weakness described in
CVE-2007-1558 for mpop-1.0.5.

- It is less invasive than the previous patch. APOP authentication is
 still fully supported even without TLS. No user needs to change his
 configuration.
- The APOP check was updated. The minimum length requirement is gone.
 There is a new check for an '@' now. This ensures that the APOP
 timestamp has both a local and a domain part, as required by the RFCs.

With this patch, it should be safe to continue to use APOP
authentication for now.

Regards,
Martin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGNO3XU5CaZRW8NIsRAomNAJ0SFZ6dALStE7niq0XCcbkQY7bPqgCaAtSz
eTvNwhdiTk9/1VxmLaz4NAc=
=LOzG
-----END PGP SIGNATURE-----
diff -ur mpop-1.0.5/src/pop3.c mpop-1.0.5-apop-fix/src/pop3.c
--- mpop-1.0.5/src/pop3.c	2006-09-23 03:35:03.000000000 +0200
+++ mpop-1.0.5-apop-fix/src/pop3.c	2007-04-29 21:00:05.000000000 +0200
@@ -407,11 +407,13 @@
  * see pop3.h
  */
 
+char *pop3_get_addr(const char *s);
+
 int pop3_get_greeting(pop3_session_t *session, char *greeting, 
 	char **errmsg, char **errstr)
 {
     int e;
-    char *p, *q;
+    char *p, *q, *a;
     
     if ((e = pop3_get_msg(session, 0, errstr)) != POP3_EOK)
     {
@@ -429,17 +431,23 @@
 	/* 'greeting' is large enough */
 	strcpy(greeting, session->buffer + 4);
     }
-    /* search APOP timestamp */
-    if ((p = strchr(session->buffer, '<')) != NULL)
-    {
-	if ((q = strchr(p, '>')) != NULL)
-	{
-	    session->cap.flags |= POP3_CAP_AUTH_APOP;
-	    session->cap.apop_timestamp = xmalloc((q - p + 2) * sizeof(char));
-	    strncpy(session->cap.apop_timestamp, p, q - p + 1);
-	    session->cap.apop_timestamp[q - p + 1] = '\0';
-	}
+    /* Search APOP timestamp. Make sure that it is a valid RFC822 message id as
+     * required by RFC 1939. This should make man-in-the-middle attacks as 
+     * described in CVE-2007-1558 harder. */
+    a = NULL;
+    if ((p = strchr(session->buffer, '<')) != NULL	/* start of timestamp */
+	    && (q = strchr(p + 1, '>')) != NULL		/* end of timestamp */
+	    && (a = pop3_get_addr(p))			/* valid address */
+	    && strchr(a, '@')				/* has domain part */
+	    && strlen(a) + 2 == (size_t)(q - p + 1)	/* no specials */
+	    && strncmp(p + 1, a, q - p - 1) == 0)	/* no invalid chars */
+    {
+      	session->cap.flags |= POP3_CAP_AUTH_APOP;
+       	session->cap.apop_timestamp = xmalloc((q - p + 2) * sizeof(char));
+	strncpy(session->cap.apop_timestamp, p, q - p + 1);
+	session->cap.apop_timestamp[q - p + 1] = '\0';
     }
+    free(a);
 
     return POP3_EOK;
 }

--- End Message ---
--- Begin Message ---
Source: mpop
Source-Version: 1.0.5-1etch1

We believe that the bug you reported is fixed in the latest version of
mpop, which is due to be installed in the Debian FTP archive:

mpop_1.0.5-1etch1.diff.gz
  to pool/main/m/mpop/mpop_1.0.5-1etch1.diff.gz
mpop_1.0.5-1etch1.dsc
  to pool/main/m/mpop/mpop_1.0.5-1etch1.dsc
mpop_1.0.5-1etch1_i386.deb
  to pool/main/m/mpop/mpop_1.0.5-1etch1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien Louis <[EMAIL PROTECTED]> (supplier of updated mpop package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


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

Format: 1.7
Date: Sun, 27 May 2007 06:14:48 +0000
Source: mpop
Binary: mpop
Architecture: source i386
Version: 1.0.5-1etch1
Distribution: stable-security
Urgency: high
Maintainer: Julien Louis <[EMAIL PROTECTED]>
Changed-By: Julien Louis <[EMAIL PROTECTED]>
Description: 
 mpop       - POP3 mail retriever
Closes: 426077
Changes: 
 mpop (1.0.5-1etch1) stable-security; urgency=high
 .
   * Fix APOP weakness CVE-2007-1558 (Closes: #426077).
Files: 
 e5faaf09535abc400cd90ba369ffc117 671 net extra mpop_1.0.5-1etch1.dsc
 90b19299e9238742260a6192b93dd46a 3318 net extra mpop_1.0.5-1etch1.diff.gz
 5f0c8c3e70c21aa3ebb7f6aa315aa3b0 246308 net extra mpop_1.0.5-1etch1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGXBrUvGr7W6HudhwRAhK3AKCXmSjxZtEk5kPJqRK+ALOt6OXJZwCeMl86
PXxQKAfzq1nxRDiooaVXVAI=
=v0sA
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to