Skip to content

fix: bump pyo3 to 0.29.0 to clear RUSTSEC-2026-0176 / 0177 - #25

Merged
berisher merged 2 commits into
mainfrom
fix/bump-pyo3-rustsec-2026-0176-0177
Jun 23, 2026
Merged

fix: bump pyo3 to 0.29.0 to clear RUSTSEC-2026-0176 / 0177#25
berisher merged 2 commits into
mainfrom
fix/bump-pyo3-rustsec-2026-0176-0177

Conversation

@berisher

Copy link
Copy Markdown
Collaborator

Summary

The daily Security Audit workflow on main has been failing since ~6/19 because cargo audit flagged pyo3 0.27.1 with two advisories published 2026-06-11:

  • RUSTSEC-2026-0176 — Out-of-bounds read in nth / nth_back for PyList and PyTuple iterators
  • RUSTSEC-2026-0177 — Missing Sync bound on PyCFunction::new_closure closures

The advised fix floor for both is >=0.29.0.

Change

Bump pyo3 0.27.10.29.0 (Cargo.toml + Cargo.lock). pyo3 is an optional dependency behind the python-bindings feature; the existing bindings already use the modern Bound API, so the bump is source-compatible.

Testing

  • cargo audit — exit 0 (root and fuzz/)
  • cargo build --features python-bindings — clean
  • cargo clippy --features python-bindings --all-targets — clean
  • cargo test --features python-bindings — 20 tests + 6 doc-tests pass

🤖 Generated with Claude Code

berisher and others added 2 commits June 23, 2026 08:21
cargo audit flagged pyo3 0.27.1 with two advisories (both dated
2026-06-11), failing the daily Security Audit on main:

  RUSTSEC-2026-0176  Out-of-bounds read in nth/nth_back for PyList/PyTuple iterators
  RUSTSEC-2026-0177  Missing Sync bound on PyCFunction::new_closure closures

Fix version for both is >=0.29.0. pyo3 is an optional dep behind the
python-bindings feature; the existing bindings already use the modern
Bound API, so the bump is source-compatible.

Repro:  cargo audit
After:   cargo audit reports no vulnerabilities (exit 0); fuzz/ audit
         also clean; cargo build/clippy/test --features python-bindings
         all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Code Coverage job (cargo tarpaulin, nightly toolchain) was failing
to link with:

  rust-lld: error: undefined symbol: _PyEval_RequestCodeExtraIndex
  referenced by pyo3_ffi::cpython::ceval

tarpaulin.toml set `all-features = true`, which enables the optional
`python-bindings` feature and compiles src/python.rs into the coverage
test binary, link-binding libpython. Under the nightly toolchain's
rust-lld (now the default linker) the private CPython symbol does not
resolve, so the binary fails to link. This is deterministic, not a
flake — re-running the job reproduces it.

The bindings are a thin PyO3 FFI shim that cannot be exercised from Rust
tests (they need a live interpreter), so src/python.rs always scored
0/36 lines and contributed nothing measurable. The real Python surface
is covered by the maturin-built pytest suite.

Set `all-features = false` so coverage builds the default feature set.
This drops the unlinkable FFI shim from the build graph and, by removing
36 uncoverable lines from the denominator, nudges reported coverage up
(80.85% -> 81.71% locally) rather than down.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@berisher
berisher merged commit d7f6538 into main Jun 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant