Benjamin Peterson
e052d40cea
[2.7] bpo-32981: Fix catastrophic backtracking vulns (GH-5955)
...
* Prevent low-grade poplib REDOS (CVE-2018-1060)
The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.
Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.
A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.
Replace it with a similar non-vulnerable regex.
The new regex is RFC compliant.
The old regex was non-compliant in edge cases.
* Prevent difflib REDOS (CVE-2018-1061)
The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.
Replace it with an equivalent non-vulnerable regex.
Also introduce unit and REDOS tests for difflib.
Co-authored-by: Tim Peters <tim.peters@gmail.com >
Co-authored-by: Christian Heimes <christian@python.org >.
(cherry picked from commit 0e6c8ee235 )
2018-03-03 22:18:17 -08:00
..
2017-07-24 13:01:59 +02:00
2016-12-27 15:09:36 +02:00
2017-10-22 12:15:41 +03:00
2016-12-28 10:16:06 +02:00
2018-02-18 19:56:06 -08:00
2018-02-12 20:16:42 +02:00
2016-05-26 05:28:50 +00:00
2017-09-25 11:03:24 +10:00
2016-06-02 10:35:44 +00:00
2017-06-11 14:19:39 -05:00
2017-10-22 12:15:41 +03:00
2017-12-28 23:38:55 -08:00
2017-10-26 00:28:02 +03:00
2017-11-11 14:48:49 -08:00
2015-11-02 03:37:02 +00:00
2017-07-26 17:54:42 +02:00
2013-01-31 23:52:03 +01:00
2016-04-17 09:37:36 +03:00
2016-04-17 09:37:36 +03:00
2016-07-11 07:51:37 +00:00
2017-08-26 11:17:02 -07:00
2017-11-08 01:57:02 -08:00
2018-03-03 22:18:17 -08:00
2017-10-18 10:30:05 -07:00
2016-05-26 05:28:50 +00:00
2017-05-17 10:08:11 +03:00
2012-05-19 18:36:04 +03:00
2015-05-26 01:35:54 -07:00
2016-05-08 13:18:25 +00:00
2013-12-18 15:36:34 -06:00
2016-06-02 10:35:44 +00:00
2016-06-03 05:59:20 +00:00
2017-05-18 12:34:40 +03:00
2018-02-25 07:34:46 -08:00
2013-12-18 00:28:36 +01:00
2018-02-21 08:37:18 +02:00
2014-10-17 20:07:08 -04:00
2016-12-27 15:09:36 +02:00
2017-07-27 01:24:52 +02:00
2016-02-23 22:30:50 +00:00
2016-06-08 07:16:14 +00:00
2012-05-01 10:46:59 +08:00
2015-04-10 13:24:10 +03:00
2016-09-27 22:45:20 -04:00
2016-05-26 05:28:50 +00:00
2015-10-03 05:55:46 +00:00
2012-10-27 14:42:36 -04:00
2015-11-02 03:37:02 +00:00
2012-07-16 00:11:05 -07:00
2017-11-29 02:15:43 +02:00
2016-05-26 05:28:50 +00:00
2011-09-01 20:04:50 +02:00
2012-01-23 17:30:53 +01:00
2016-06-02 10:35:44 +00:00
2016-07-10 08:34:21 -07:00
2017-08-05 18:03:01 +03:00
2015-11-30 17:20:02 +02:00
2018-02-10 00:02:04 +02:00
2016-08-13 11:10:23 -07:00
2018-03-03 22:18:17 -08:00
2016-09-07 12:03:06 +00:00
2016-12-02 07:58:42 +02:00
2013-05-08 23:42:41 -04:00
2016-03-08 23:34:28 +02:00
2015-01-27 11:40:51 +02:00
2017-07-26 17:50:36 +02:00
2017-09-25 14:41:34 +03:00
2015-02-13 12:02:05 +02:00
2016-04-17 09:37:36 +03:00
2016-11-14 19:25:44 +02:00
2014-08-12 12:54:55 +03:00
2016-04-19 04:03:41 +00:00
2014-12-01 18:16:30 +02:00
2016-04-15 02:14:19 +00:00
2014-05-11 16:11:44 -07:00
2015-01-18 11:42:50 +02:00
2017-04-15 18:35:46 +03:00
2016-09-16 02:54:11 +00:00
2017-05-16 17:38:30 -07:00
2014-01-25 19:42:27 +02:00
2017-02-01 22:53:03 +02:00
2015-11-02 03:37:02 +00:00
2012-02-26 01:26:09 +01:00
2015-04-01 16:53:53 +03:00
2017-05-20 18:44:02 -07:00
2015-02-13 12:02:05 +02:00
2013-10-23 21:45:58 -07:00
2016-04-17 09:37:36 +03:00
2014-01-25 19:42:27 +02:00
2011-12-19 07:28:08 +02:00
2015-11-11 17:33:12 +02:00
2017-09-06 18:31:36 -04:00
2016-05-14 07:25:37 +00:00
2016-05-26 05:28:50 +00:00
2017-12-10 15:09:58 +09:00
2013-10-01 11:39:08 -04:00
2016-04-15 02:14:19 +00:00
2015-10-24 17:39:36 +03:00
2012-02-26 01:37:47 +01:00
2016-04-19 04:03:41 +00:00
2016-04-15 02:14:19 +00:00
2015-04-13 20:24:10 -04:00
2016-06-02 10:35:44 +00:00
2015-09-05 19:13:17 -04:00
2015-11-07 11:15:32 +02:00
2016-12-27 15:09:36 +02:00
2011-09-01 22:06:49 +02:00
2017-10-09 10:55:54 -04:00
2016-09-21 09:10:21 -07:00
2013-04-23 13:47:06 +02:00
2018-03-03 22:18:17 -08:00
2016-08-23 12:30:28 -04:00
2013-10-02 11:40:26 +03:00
2016-05-26 05:28:50 +00:00
2012-02-16 00:40:03 -08:00
2015-04-14 19:03:06 +03:00
2012-05-18 21:54:25 +03:00
2016-06-12 05:25:16 +00:00
2013-08-10 18:17:01 -04:00
2017-01-06 16:13:37 -08:00
2014-11-30 11:47:54 -05:00
2016-05-29 08:13:58 +00:00
2015-11-23 23:50:26 +00:00
2016-05-08 13:18:25 +00:00
2015-12-03 01:23:10 +00:00
2011-10-19 10:39:35 +03:00
2015-04-10 13:24:10 +03:00
2016-08-09 14:57:03 +01:00
2016-12-16 19:04:17 +02:00
2016-04-18 03:45:18 +00:00
2016-07-11 07:51:37 +00:00
2016-12-03 02:14:09 -05:00
2011-10-20 23:21:58 +02:00
2017-05-25 02:24:27 +08:00
2016-04-17 09:37:36 +03:00
2016-04-17 09:37:36 +03:00
2017-05-18 12:34:40 +03:00
2013-09-20 21:25:53 +03:00
2017-05-18 13:46:17 +03:00
2017-09-07 22:31:17 -07:00
2015-03-24 22:27:50 +02:00
2013-02-13 12:26:58 +02:00
2017-09-05 11:20:02 -07:00
2014-01-29 00:15:59 -05:00
2012-02-26 01:26:09 +01:00
2013-10-26 13:13:51 -04:00
2017-05-12 11:31:08 +02:00
2017-03-22 15:22:44 +08:00
2016-10-30 20:52:55 +02:00
2017-12-29 12:44:04 -08:00
2016-02-29 00:31:38 +00:00
2015-10-28 21:39:36 +02:00
2015-10-10 19:34:46 -07:00
2015-05-30 19:37:19 +03:00
2014-01-16 18:59:17 +02:00
2015-06-28 13:05:19 -04:00
2014-01-16 18:59:17 +02:00
2014-01-22 01:33:59 +01:00
2015-03-04 09:42:59 +02:00
2016-05-16 01:07:13 +00:00
2017-06-20 16:20:36 +02:00
2014-01-18 18:30:09 +02:00
2015-09-29 23:33:03 +03:00
2017-11-04 10:23:09 +02:00
2017-06-05 09:13:50 -04:00
2016-10-25 09:51:38 +03:00
2017-07-31 10:52:46 -07:00
2016-10-13 13:29:55 -07:00
2011-09-19 16:57:18 +02:00
2014-10-10 21:11:34 +03:00
2015-11-02 03:37:02 +00:00
2017-05-04 23:54:43 -07:00