2014-12-04 13:05:09 +01:00
|
|
|
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.
|
|
|
|
|
|
|
|
Index: mutt/lib.c
|
|
|
|
===================================================================
|
2015-01-26 17:35:10 +01:00
|
|
|
---
|
2018-07-05 13:57:50 +02:00
|
|
|
lib.c | 3 +++
|
2015-01-26 17:35:10 +01:00
|
|
|
1 file changed, 3 insertions(+)
|
|
|
|
|
2018-07-05 13:57:50 +02:00
|
|
|
--- lib.c
|
2019-01-02 15:21:18 +01:00
|
|
|
+++ lib.c 2019-01-02 13:25:44.767193676 +0000
|
2022-01-11 12:02:02 +01:00
|
|
|
@@ -675,6 +675,9 @@ char *mutt_substrdup (const char *begin,
|
2014-12-04 13:05:09 +01:00
|
|
|
size_t len;
|
2018-07-05 13:57:50 +02:00
|
|
|
char *p;
|
2014-12-04 13:05:09 +01:00
|
|
|
|
|
|
|
+ if (end != NULL && end < begin)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
|
|
if (end)
|
|
|
|
len = end - begin;
|
|
|
|
else
|