Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

GH-130397: remove special-casing of C stack depth for WASI#134469

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

brettcannon
Copy link
Member

@brettcannonbrettcannon commentedMay 21, 2025
edited by bedevere-appbot
Loading

Along the way disable some tests which now fail (which were already disabled under Emscripten).

This doesn't pose any sercurity risk thanks to WebAssembly's stack protection.

rajsite reacted with rocket emoji
Removed special-casing for WASI when setting C stack depth limits. Since WASI has its own C stack checking this isn't a security risk.Also disabled some tests that stopped passing. They all happened to have already been disabled under Emscripten.
@brettcannonbrettcannon merged commitad42dc1 intopython:mainMay 22, 2025
45 checks passed
@brettcannonbrettcannon deleted the 130397-wasi-debug-passing branchMay 22, 2025 21:08
@miss-islington-app
Copy link

Thanks@brettcannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 22, 2025
…honGH-134469)Removed special-casing for WASI when setting C stack depth limits. Since WASI has its own C stack checking this isn't a security risk.Also disabled some tests that stopped passing. They all happened to have already been disabled under Emscripten.(cherry picked from commitad42dc1)Co-authored-by: Brett Cannon <brett@python.org>
@bedevere-app
Copy link

GH-134547 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 22, 2025
brettcannon added a commit that referenced this pull requestMay 22, 2025
…-134469) (GH-134547)GH-130397: remove special-casing of C stack depth for WASI (GH-134469)Removed special-casing for WASI when setting C stack depth limits. Since WASI has its own C stack checking this isn't a security risk.Also disabled some tests that stopped passing. They all happened to have already been disabled under Emscripten.(cherry picked from commitad42dc1)Co-authored-by: Brett Cannon <brett@python.org>
@markshannon
Copy link
Member

One of us is misunderstanding the way stacks work in C compiled to webassembly.

As I understand it, there are two stacks: the built in webassembly stack which does have built in protected and and additional stack for arrays and other objects that can have their address taken on the stack. This second stack has no built in protection.

Removing the protection we provide makes it possible to trash the heap and could perhaps introduce security vulnerabilities.

@hoodmane is this correct?

@markshannon
Copy link
Member

What I think we should be doing is reducing the size of the webassembly stack and increasing the size of the in-heap stack, such that the majority of stack overflows are caught by our stack protection mechanism and reported as an exception.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@iritkatrieliritkatrielAwaiting requested review from iritkatrieliritkatriel is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@hoodmanehoodmaneAwaiting requested review from hoodmane

Assignees

@brettcannonbrettcannon

Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@brettcannon@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp