Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A Series of Simple DOS Vulnerabilities #134873

Copy link
Copy link
Open
@kexinoh

Description

@kexinoh
Issue body actions

Bug report

Bug description:

We have identified a series of simple quadratic complexity vulnerabilities. After confirmation by CPython's security team, since these DOS vulnerabilities pose a low threat and are relatively tedious to exploit, we can directly initiate requests in issues to seek assistance from the community for fixes.
Below are the specific locations of the different complexity issues we discovered.

1.

def expandvars(path):

2.
def _parseparam(s):

3.
while methodname[:1] == '<':

4.
def get_phrase(value):

5.
while value and (value[0]=='\\' or value[0] not in PHRASE_ENDS):

6.
value = value[1:]

7.
value = value[1:]

8.
value = value[1:]

9.
value = value[1:]

10.
value = value[1:]

11.
value = value[1:]

12.
value = value[1:]

13.
value = value[1:]

14.
value = value[1:]

15.
value = value[1:]

16.
to_encode = to_encode[1:]

17.
def expandvars(str, vars):

18.
def expandvars(path):

19.
while True:

20.
while line and line[-1] in " \t":

21.
while platform and platform[-1] == '-':

Current repair status:

03/19 has been fixed. @johnzhou721
1 has been fixed. @Wulian233
2/4/5/6/7/8/9/10/11/12/13/14/15/16 has been fixed. @picnixz
1/18 has been fixed. @serhiy-storchaka

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Credits

Finder is kexinoh (Xiangfan Wu) from QI-ANXIN Technology Research Institute.

Linked PRs

Metadata

Metadata

Labels

3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.9only security fixesonly security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-IDLEtopic-emailtopic-pathlibtype-securityA security issueA security issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.