Skip to content

chore(deps): update rust crate tracing to v0.1.43 [security] - autoclosed - #630

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-tracing-vulnerability
Closed

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-tracing-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
tracing (source) dependencies patch 0.1.41 → 0.1.43

use-after-free in tracing

GHSA-8f24-6m29-wm2r

More information

Details

The implementation of the Instrumented::into_inner method in affected versions of this crate contains undefined behavior due to incorrect use of std::mem::forget The function creates *const pointers to self, calls mem::forget(self), and then moves values out of those pointers using std::ptr::read.

// To manually destructure `Instrumented` without `Drop`, we
// move it into a ManuallyDrop and use pointers to its fields
let span: *const Span = &this.span;
let inner: *const ManuallyDrop<T> = &this.inner;
mem::forget(self);
// SAFETY: Those pointers are valid for reads, because `Drop` didn't
//         run, and properly aligned, because `Instrumented` isn't
//         `#[repr(packed)]`.
let _span = unsafe { span.read() };
let inner = unsafe { inner.read() };

However, the mem::forget documentation states:

Any resources the value manages, such as heap memory or a file handle, will
linger forever in an unreachable state. However, it does not guarantee that
pointers to this memory will remain valid.

This means that these pointers are no longer valid. This could result in a stack use-after-free if LLVM chooses to reuse self's stack slot for a rebinding after the call to std::mem::forget.

This undefined behavior has not been observed to cause miscompilation as of Rust 1.73.0. However, any use of this method with the affected versions of tracing are unsound.

The flaw was corrected in commit 20a1762 (PR #​2765) by replacing the use of std::mem::forget with std::mem::ManuallyDrop, ensuring that the stack slot is not reused and the pointers remain valid when they are read. The fix is
published in tracing v0.1.40. Affected versions have been yanked from crates.io.

Thanks to Taylor Cramer and Manish Goregaokar for finding and correcting
this issue!

Severity

Medium

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

tokio-rs/tracing (tracing)

v0.1.43: tracing 0.1.43

Compare Source

Important

The previous release 0.1.42 was yanked because #​3382 was a breaking change.
See further details in #​3424. This release contains all the changes from that
version, plus a revert for the problematic part of the breaking PR.

Fixed
  • Revert "make valueset macro sanitary" (#​3425)

v0.1.42: tracing 0.1.42

Compare Source

Important

The Span::record_all method has been removed from the documented API. It
was always unsuable via the documented API as it requried a ValueSet which
has no publically documented constructors. The method remains, but should not
be used outside of tracing macros.

Added
  • attributes: Support constant expressions as instrument field names (#​3158)
  • Add record_all! macro for recording multiple values in one call (#​3227)
  • core: Improve code generation at trace points significantly (#​3398)
Changed
  • tracing-core: updated to 0.1.35 (#​3414)
  • tracing-attributes: updated to 0.1.31 (#​3417)
Fixed
  • Fix "name / parent" variant of event! (#​2983)
  • Remove 'r#' prefix from raw identifiers in field names (#​3130)
  • Fix perf regression when release_max_level_* not set (#​3373)
  • Use imported instead of fully qualified path (#​3374)
  • Make valueset macro sanitary (#​3382)
Documented
  • core: Add missing dyn keyword in Visit documentation code sample (#​3387)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested review from a team and dezren39 as code owners October 23, 2026 01:44
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d801b99-d7fa-45eb-a940-84300c41cbb7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@renovate renovate Bot changed the title Update Rust crate tracing to v0.1.43 [SECURITY] chore(deps): update rust crate tracing to v0.1.43 [security] Oct 23, 2026
@renovate renovate Bot changed the title chore(deps): update rust crate tracing to v0.1.43 [security] chore(deps): update rust crate tracing to v0.1.43 [security] - autoclosed Oct 23, 2026
@renovate renovate Bot closed this Oct 23, 2026
@renovate
renovate Bot deleted the renovate/crate-tracing-vulnerability branch October 23, 2026 03:27
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