GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.14] gh-119452: Block until data is read by hugovk · Pull Request #142176 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Dec 2, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Possible fix for #119455 (comment), see also #119455 (review).

  • Issue: OOM a potential denial of service in the CGI server on Windows #119452

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
Block until data is read
56a1e65
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 2, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 2, 2025
OOM a potential denial of service in the CGI server on Windows #119452
Closed
@hugovk

hugovk commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

!buildbot AMD64 Windows11 Non-Debug

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Dec 2, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hugovk for commit 56a1e65 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F142176%2Fmerge

The command will test the builders whose names match following regular expression: AMD64 Windows11 Non-Debug

The builders matched are:

  • AMD64 Windows11 Non-Debug PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk mentioned this pull request Dec 2, 2025
[3.14] gh-119452: Fix a potential virtual memory allocation denial of service in http.server #119455
Merged
@encukou encukou added the skip news label Dec 2, 2025
encukou
encukou reviewed Dec 2, 2025
View reviewed changes
Comment thread Lib/http/server.py
cursize = 0
data = self.rfile.read(min(nbytes, _MIN_READ_BUF_SIZE))
while (len(data) < nbytes and len(data) != cursize and
select.select([self.rfile._sock], [], [], 0)[0]):

@encukou encukou Dec 2, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

According to the current docs this should be omitted.
It might be better to document what None does: #142177

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@hugovk

hugovk commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

Windows builds are timing out on GitHub Actions:

test_large_content_length_truncated (test.test_httpservers.CGIHTTPServerTestCase.test_large_content_length_truncated) ... Timeout (0:10:00)!

https://github.com/python/cpython/actions/runs/19851448458/job/56879004094?pr=142176

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

encukou added a commit to encukou/cpython that referenced this pull request Dec 2, 2025
@encukou
[3.14] pythongh-142176: Read/write CGI data using worker threads
a773018
This reads/writes data as available, making the CGI application
responsible for managing any timeouts when receiving data from
clients.

Data is read in chunks of bounded size, and passed on immediately
(except stderr, which is combined into a single message as before).
This does need 3 threads. (As does process.communicate.)
@hugovk

hugovk commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

Closing in favour of a revert for 3.14.1: #142184.

And we have #142181 and #142185 to consider after that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk closed this Dec 2, 2025
@hugovk
hugovk deleted the 3.14-http-server-block-indefinitely branch December 2, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@hugovk @bedevere-bot @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.