Skip to content

Add advisory for ringbuf: panic-safety double-free in Consumer::skip/… - #3230

Merged
djc merged 1 commit into
rustsec:mainfrom
tooson9010-spec:ringbuf-advisory
Sep 21, 2026
Merged

djc merged 1 commit into
rustsec:mainfrom
tooson9010-spec:ringbuf-advisory

Conversation

@tooson9010-spec

Copy link
Copy Markdown
Contributor

Affected crate(s)

  • ringbuf (5,140,045 recent downloads per crates.io)

Links to upstream issue(s) or PR(s)

Fixed in agerasev/ringbuf#60, released in 0.5.2.

Severity

Panic-safety unsoundness in Consumer::skip / clear: the consumed elements are dropped before the read index is advanced, so a panicking element Drop leaves the read index pointing at already-dropped slots. The LocalRb destructor then drops them again — a double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust, confirmed under AddressSanitizer. Fixed in 0.5.2.

Checklist

  • Advisory filename(s) starts with RUSTSEC-0000-0000 as the ID
  • date field is set to the public disclosure date
  • Contains a concise and descriptive title after advisory metadata
  • Asked maintainer(s) if publishing an advisory is appropriate (maintainer approved in the PR thread)

@djc
djc merged commit 2e3e0b5 into rustsec:main Sep 21, 2026
1 check passed
@djc

djc commented Sep 21, 2026

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants