• Benjamin Peterson's avatar
    [3.6] bpo-32981: Fix catastrophic backtracking vulns (GH-5955) · c9516754
    Benjamin Peterson yazdı
    * 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: 's avatarTim Peters <tim.peters@gmail.com>
    Co-authored-by: Christian Heimes <christian@python.org>.
    (cherry picked from commit 0e6c8ee2)
    c9516754
Adı
Son kayıt (commit)
Son güncelleme
..
next Loading commit data...
3.5.0.rst Loading commit data...
3.5.0a1.rst Loading commit data...
3.5.0a2.rst Loading commit data...
3.5.0a3.rst Loading commit data...
3.5.0a4.rst Loading commit data...
3.5.0b1.rst Loading commit data...
3.5.0b2.rst Loading commit data...
3.5.0b3.rst Loading commit data...
3.5.0b4.rst Loading commit data...
3.5.0rc1.rst Loading commit data...
3.5.0rc2.rst Loading commit data...
3.5.0rc3.rst Loading commit data...
3.5.0rc4.rst Loading commit data...
3.5.1.rst Loading commit data...
3.5.1rc1.rst Loading commit data...
3.5.2.rst Loading commit data...
3.5.2rc1.rst Loading commit data...
3.5.3.rst Loading commit data...
3.5.3rc1.rst Loading commit data...
3.6.0.rst Loading commit data...
3.6.0a1.rst Loading commit data...
3.6.0a2.rst Loading commit data...
3.6.0a3.rst Loading commit data...
3.6.0a4.rst Loading commit data...
3.6.0b1.rst Loading commit data...
3.6.0b2.rst Loading commit data...
3.6.0b3.rst Loading commit data...
3.6.0b4.rst Loading commit data...
3.6.0rc1.rst Loading commit data...
3.6.0rc2.rst Loading commit data...
3.6.1.rst Loading commit data...
3.6.1rc1.rst Loading commit data...
3.6.2.rst Loading commit data...
3.6.2rc1.rst Loading commit data...
3.6.2rc2.rst Loading commit data...
3.6.3.rst Loading commit data...
3.6.3rc1.rst Loading commit data...
3.6.4.rst Loading commit data...
3.6.4rc1.rst Loading commit data...