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-101659: initialize stack variable _sharedexception#103048

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

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantiangaogaotiantian commentedMar 26, 2023
edited by bedevere-bot
Loading

In./Modules/_xxsubinterpretersmodule.c a variable_sharedexception exc on stack is declared introduced in#102659. The variable is not initialized.

In_run_script, it's possible that the function hits an error and goes toerror label without properly initializing the variable. Then_sharedexception_bind can also potentially error out to trigger_sharedexception_clear(sharedexc), which may free the uninitialized pointer. I have not found an exploit on this, but there's a potential path. Also the fix is so easy and cheap so I think we can just initialize the variable withno_exception (basically{0}).

Oh BTW, gcc complains with the possible unitialized variable.

I would guess@ericsnowcurrently is the right person to review this? Thanks!

@iritkatriel
Copy link
Member

CC@ericsnowcurrently

@arhadthedevarhadthedev added type-bugAn unexpected behavior, bug, or error extension-modulesC modules in the Modules dir topic-subinterpreters labelsMar 30, 2023
@gaogaotiantian
Copy link
MemberAuthor

Fixed in#103245

@gaogaotiantiangaogaotiantian deleted the uninitialized-sharedexception branchApril 9, 2023 03:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

awaiting reviewextension-modulesC modules in the Modules dirtopic-subinterpreterstype-bugAn unexpected behavior, bug, or error

Projects

Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gaogaotiantian@iritkatriel@arhadthedev@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp