View | Details | Raw Unified | Return to bug 195550 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	mutt
4
PORTNAME=	mutt
5
PORTVERSION=	1.5.23
5
PORTVERSION=	1.5.23
6
PORTREVISION?=	6
6
PORTREVISION?=	7
7
CATEGORIES+=	mail ipv6
7
CATEGORIES+=	mail ipv6
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
9
		ftp://ftp.mutt.org/mutt/devel/ \
9
		ftp://ftp.mutt.org/mutt/devel/ \
(-)./files/patch-CVE-2014-9116 (+34 lines)
Line 0 Link Here
1
This patch solves the issue raised by CVE-2014-9116.
2
3
We correctly redefine what are the whitespace characters as per RFC5322; by
4
doing so we prevent mutt_substrdup from being used in a way that could lead to
5
a segfault.
6
7
The lib.c part was written by Antonio Radici <antonio@debian.org> to prevent
8
crashes due to this kind of bugs from happening again.
9
10
Taken from the debian port for jessie. Thanks to the debian people!
11
12
--- lib.c.orig
13
+++ lib.c
14
@@ -815,6 +815,9 @@ char *mutt_substrdup (const char *begin,
15
   size_t len;
16
   char *p;
17
 
18
+  if (end != NULL && end < begin)
19
+    return NULL;
20
+
21
   if (end)
22
     len = end - begin;
23
   else
24
--- lib.h.orig
25
+++ lib.h
26
@@ -98,7 +98,7 @@
27
    on some systems */
28
 # define SKIPWS(c) while (*(c) && isspace ((unsigned char) *(c))) c++;
29
 
30
-#define EMAIL_WSP " \t\r\n"
31
+#define EMAIL_WSP " \t\r"
32
 
33
 /* skip over WSP as defined by RFC5322.  This is used primarily for parsing
34
  * header fields. */

Return to bug 195550