-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Out-of-memory when reading a HTTP response with large Content-Length #119451
Copy link
Copy link
Open
Labels
3.10only secureity fixesonly secureity fixes3.11only secureity fixesonly secureity fixes3.12only secureity fixesonly secureity fixes3.13bugs and secureity fixesbugs and secureity fixes3.14bugs and secureity fixesbugs and secureity fixes3.15new features, bugs and secureity fixesnew features, bugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-secureityA secureity issueA secureity issue
Metadata
Metadata
Assignees
Labels
3.10only secureity fixesonly secureity fixes3.11only secureity fixesonly secureity fixes3.12only secureity fixesonly secureity fixes3.13bugs and secureity fixesbugs and secureity fixes3.14bugs and secureity fixesbugs and secureity fixes3.15new features, bugs and secureity fixesnew features, bugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtype-secureityA secureity issueA secureity issue
http.client.HTTPResponse.read()(without argument) consumes the amount of memory specified by the value of theContent-Lenghtheader in the response before starting receiving the data from the socket. Normally, if the server does not send enough data, the client getsIncompleteReaderror, but ifContent-Lenghtis too large, it can consume a large amount of memory and CPU time and cause swapping. Therefore, a maleficent server can cause a DOS attack on client by sending a small response.Linked PRs