summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/mutt-CVE-2014-9116.patch
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-06 12:57:15 -0500
committerMark H Weaver <mhw@netris.org>2015-01-06 12:57:15 -0500
commit23800e47361304682914314b99cfd4f3926f28e3 (patch)
treee67d984ab5961a81c8b8c6396c79cb218fecda85 /gnu/packages/patches/mutt-CVE-2014-9116.patch
parent9b1bf33081652210502c6ef34506e27a9bc60f06 (diff)
parentaebb05b09502be00fb121f9c6cd74a190fb12a1c (diff)
downloadguix-patches-23800e47361304682914314b99cfd4f3926f28e3.tar
guix-patches-23800e47361304682914314b99cfd4f3926f28e3.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/mutt-CVE-2014-9116.patch')
-rw-r--r--gnu/packages/patches/mutt-CVE-2014-9116.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/patches/mutt-CVE-2014-9116.patch b/gnu/packages/patches/mutt-CVE-2014-9116.patch
new file mode 100644
index 0000000000..91e17ecbe0
--- /dev/null
+++ b/gnu/packages/patches/mutt-CVE-2014-9116.patch
@@ -0,0 +1,46 @@
+Fix CVE-2014-9116. Copied from Debian:
+
+This patch solves the issue raised by CVE-2014-9116 in bug 771125.
+
+We correctly redefine what are the whitespace characters as per RFC5322; by
+doing so we prevent mutt_substrdup from being used in a way that could lead to
+a segfault.
+
+The lib.c part was written by Antonio Radici <antonio@debian.org> to prevent
+crashes due to this kind of bugs from happening again.
+
+The wheezy version of this patch is slightly different, therefore this patch
+has -jessie prefixed in its name.
+
+The sendlib.c part was provided by Salvatore Bonaccorso and it is the same as
+the upstream patch reported here:
+http://dev.mutt.org/trac/attachment/ticket/3716/ticket-3716-stable.patch
+
+--- a/lib.c
++++ b/lib.c
+@@ -815,6 +815,9 @@ char *mutt_substrdup (const char *begin,
+ size_t len;
+ char *p;
+
++ if (end != NULL && end < begin)
++ return NULL;
++
+ if (end)
+ len = end - begin;
+ else
+--- a/sendlib.c
++++ b/sendlib.c
+@@ -1814,7 +1814,12 @@ static int write_one_header (FILE *fp, i
+ {
+ tagbuf = mutt_substrdup (start, t);
+ /* skip over the colon separating the header field name and value */
+- t = skip_email_wsp(t + 1);
++ ++t;
++
++ /* skip over any leading whitespace (WSP, as defined in RFC5322) */
++ while (*t == ' ' || *t == '\t')
++ t++;
++
+ valbuf = mutt_substrdup (t, end);
+ }
+ dprint(4,(debugfile,"mwoh: buf[%s%s] too long, "