diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-03-03 21:55:07 -0800 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2018-03-03 21:55:07 -0800 |
commit | 0902a2d6b2d1d9dbde36aeaaccf1788ceaa97143 (patch) | |
tree | 1b3a032baf882f64170136b71632b211d430714c /Misc/ACKS | |
parent | 0f7cf7eb8a2c9a1766780ebf225a2f4c0640788e (diff) | |
download | cpython-git-0902a2d6b2d1d9dbde36aeaaccf1788ceaa97143.tar.gz |
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>
Co-authored-by: Jamie Davis <davisjam@vt.edu>
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)
Diffstat (limited to 'Misc/ACKS')
-rw-r--r-- | Misc/ACKS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -356,6 +356,7 @@ Jonathan Dasteel Pierre-Yves David A. Jesse Jiryu Davis Jake Davis +Jamie (James C.) Davis Ratnadeep Debnath Merlijn van Deen John DeGood |