fix(deps): update rust crate pyo3 to 0.29.0 [security] - #17
Open
dependency-automation-app[bot] wants to merge 1 commit into
Open
fix(deps): update rust crate pyo3 to 0.29.0 [security]#17dependency-automation-app[bot] wants to merge 1 commit into
dependency-automation-app[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
0.16.5->0.29.0GitHub Vulnerability Alerts
GHSA-pph8-gcv7-4qj5
PyString::from_objecttook&strarguments and forwarded them directly to the Python C API without checking for terminating nul bytes. This could lead the Python interpreter to read beyond the end of the&strdata and potentially leak contents of the out-of-bounds read (by raising a Python exception containing a copy of the data including the overflow).In PyO3 0.24.1 this function will now allocate a
CStringto guarantee a terminating nul bytes. PyO3 0.25 will likely offer an alternative API which takes&CStrarguments.GHSA-36hh-v3qg-5jq4
PyO3 0.24.0 added optimized implementations of
Iterator::nthandDoubleEndedIterator::nth_backfor theBoundListIteratorandBoundTupleIteratortypes. These implementations computed the target index using uncheckedusizeaddition (index + n) before bounds-checking against the sequence length, then read the element viaget_item_unchecked.In
nthmethods, a sufficiently largen(combined with a non-zero internal index) could cause the addition to overflow and wrap around, producing a small "target index" that passed the bounds check and enabling reads at the front of thelistortupleof elements previously yielded by the iterator.In
nth_backmethods, a sufficiently largencould cause underflow in a similar fashion, however would instead allow reads of arbitrary memory past the end of thelistortuplestorage.GHSA-chgr-c6px-7xpp
PyCFunction::new_closure(and the temporarynew_closure_boundcomplement in the 0.21–0.22 series) required the supplied closure to beSend + 'staticbut notSync. The resultingPyCFunctionis a Python callable that can be invoked from any Python thread, which means the closure may be called concurrently from multiple threads, and needs aSyncbound to prevent possible data races.The problem exists under all Python versions but is particularly vulnerable under the newer free-threaded Python variant, which do not have serial execution imposed by the Global Interpreter Lock. Under releases protected by the GIL, the ability to "detach" from the Python interpreter temporarily inside the closure (e.g. by
Python::detach) makes it possible for interleaved and/or concurrent execution of various portions of the closure.PyO3 0.29.0 added a
Syncbound to close this thread-safety bug.Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.