-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
ExtensionFileLoader.load_module
aborts when initialized with a path containing null-bytes
#127208
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.12
only security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-importlib
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
Another way to trigger: >>> import _imp
>>> class n:
... name = "A"
... origin = "\x00"
...
>>> _imp.create_dynamic(n, 1)
python: Python/import.c:939: hashtable_key_from_2_strings: Assertion `strlen(key) == size - 1' failed.
Aborted |
vstinner
added a commit
to vstinner/cpython
that referenced
this issue
Nov 29, 2024
_imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
I wrote #127400 to fix the issue. |
vstinner
added a commit
that referenced
this issue
Nov 29, 2024
_imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 29, 2024
…onGH-127400) _imp.create_dynamic() now rejects embedded null characters in the path and in the module name. (cherry picked from commit b14fdad) Co-authored-by: Victor Stinner <[email protected]>
This was referenced Nov 29, 2024
Closing since completed and backported. |
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 2, 2024
…on#127400) _imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
srinivasreddy
pushed a commit
to srinivasreddy/cpython
that referenced
this issue
Jan 8, 2025
…on#127400) _imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
…on#127400) _imp.create_dynamic() now rejects embedded null characters in the path and in the module name.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
only security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-importlib
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
It's possible to abort a debug build by initializing a
_frozen_importlib_external.ExtensionFileLoader
with a path containing null-bytes, then callingload_module()
:Abort message:
Found using fusil by @vstinner.
CPython versions tested on:
3.12, 3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a2+ (heads/main:0af4ec3, Nov 20 2024, 21:45:19) [GCC 13.2.0]
Linked PRs
The text was updated successfully, but these errors were encountered: