Skip to content

[3.6] bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391) #25250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2021

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Apr 7, 2021

Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.
(cherry picked from commit 7215d1a)

Co-authored-by: Yeting Li [email protected]

https://bugs.python.org/issue43075

Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.
(cherry picked from commit 7215d1a)

Co-authored-by: Yeting Li <[email protected]>
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington
Copy link
Contributor Author

@yetingli and @vstinner: Status check is done, and it's a failure ❌ .

@vstinner
Copy link
Member

vstinner commented Apr 7, 2021

The Ubuntu job of Azure Pipelines PR failed:

FAIL: test_fontlist_key (idlelib.idle_test.test_configdialog.FontPageTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vsts/work/1/s/Lib/idlelib/idle_test/test_configdialog.py", line 104, in test_fontlist_key
    self.assertNotEqual(down_font, font)
AssertionError: 'DejaVu Sans' == 'DejaVu Sans'

This issue was fixed in Python 3.7-3.10 by https://bugs.python.org/issue39600 but Python 3.6 didn't get the fix.

@ned-deily: Do you want me to backport the IDLE test fix to 3.6 https://bugs.python.org/issue39600, or can you merge this security fix without fixing the IDLE test?

@ned-deily
Copy link
Member

@vstinner Thanks. I'll take care of it.

@ned-deily ned-deily merged commit 3fbe961 into python:3.6 May 6, 2021
@miss-islington miss-islington deleted the backport-7215d1a-3.6 branch May 6, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants