CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-Q95X-7G78-RCCV

GHSA-Q95X-7G78-RCCV: Safe Rust Memory Corruption via Use-After-Free in oneringbuf Crate

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 8, 2026·7 min read·9 visits

Executive Summary (TL;DR)

A public API design flaw in the oneringbuf crate allows safe Rust code to trigger a heap Use-After-Free and Double Free via premature deallocation of shared heap-backed ring buffers.

A critical Use-After-Free (UAF) memory corruption vulnerability exists in the oneringbuf Rust crate prior to version 0.8.0. The vulnerability allows safe Rust code to instantiate and clone reference wrappers that point to heap-allocated ring buffers. Dropping one wrapper prematurely reclaims the backing memory, leading to dangling pointer references and subsequent Use-After-Free or Double Free states.

Vulnerability Overview

The oneringbuf crate is a Rust-based collection of ring buffer implementations supporting stack-allocated, heap-allocated, and virtual-memory-backed storage. In versions prior to 0.8.0, the library exposed a public trait IntoRef with an associated method into_ref. This method permitted consumers to convert ring buffers into reference-like wrapper structures, such as DroppableRef for heap-backed storage, which was intended to simplify reference management.

The primary attack surface is the public API of the crate. By exposing IntoRef::into_ref, the API enabled downstream consumers to construct DroppableRef handles. The DroppableRef type wrapped raw pointers to heap-allocated buffers but did not properly track its active references. This configuration violates the Rust memory-safety model by exposing unsafe raw pointer operations through a fully safe public API.

Consequently, an unauthenticated local or remote attacker could trigger memory corruption, including Use-After-Free (UAF) or Double Free conditions, if they can control execution paths that utilize this API. The vulnerability belongs to the CWE-416 (Use After Free) class, leading to potential denial of service or arbitrary code execution depending on how the application processes or retrieves the affected buffers.

Root Cause Analysis

The root cause of the vulnerability lies in the interaction between the public IntoRef::into_ref trait method and the implementation of the Clone and Drop traits on the DroppableRef wrapper. When a heap-backed ring buffer such as LocalHeapRB or any buffer utilizing HeapStorage or VmemStorage is converted into a reference via into_ref, a DroppableRef wrapper is created. This wrapper encapsulates a raw pointer of type NonNull<B> pointing to the underlying heap buffer.

The DroppableRef struct implements the Clone trait. However, its cloning mechanism is flawed because it performs a trivial copy of the internal NonNull raw pointer. It does not increment any central reference counter or the crate's internal iterator state tracking (alive_iters). This results in multiple DroppableRef instances pointing to the exact same memory address, each unaware of the existence of the other clones.

The Drop implementation of DroppableRef is responsible for freeing the backing heap allocation when it is no longer needed. To do this, it invokes Box::from_raw on the internal raw pointer once its tracking indicates no more iterators are active. Because cloning the reference wrapper bypasses the reference tracking mechanisms, dropping the first cloned wrapper prematurely triggers deallocation. The other active wrappers are left pointing to deallocated memory, forming dangling pointers. Any subsequent drop or access operation on these dangling pointers results in a Use-After-Free or a Double Free.

Code Analysis

The following diagram illustrates the relationship between the cloned wrappers and the backing heap allocation, leading to the Use-After-Free condition:

Prior to version 0.8.0, the IntoRef trait in src/ring_buffer/wrappers/refs/mod.rs was defined as follows:

pub trait IntoRef {
    type TargetRef: BufRef<Buffer = Self>;
 
    // Vulnerable: Public method allowing safe construction of reference wrappers
    fn into_ref(s: Self) -> Self::TargetRef;
}

This allowed user code to invoke into_ref safely. The trait was implemented for heap-backed storage in src/ring_buffer/impls.rs:

#[cfg(feature = "alloc")]
impl<T, I: IterComponent> IntoRef for OneRingBuf<HeapStorage<T>, I> {
    type TargetRef = DroppableRef<Self>;
 
    // Vulnerable: Safely wraps the structure into DroppableRef
    fn into_ref(s: Self) -> Self::TargetRef {
        DroppableRef::from(s)
    }
}

The patch introduced in commit 643a24b30914068416dff9021a069c12c865a316 resolved this by completely stripping the into_ref method from the public trait interface:

// Patched version of IntoRef in src/ring_buffer/wrappers/refs/mod.rs
pub trait IntoRef {
    type TargetRef: BufRef<Buffer = Self>;
    // The into_ref method is completely removed
}

Similarly, the implementations of IntoRef in src/ring_buffer/impls.rs were updated to remove the definitions of into_ref. Because the method no longer exists, downstream safe Rust code can no longer instantiate DroppableRef or NonDroppableRef objects directly, mitigating the risk of incorrect cloning and premature deallocation.

Exploitation Methodology

Exploiting this vulnerability does not require any specific unsafe block in downstream code. Because the vulnerable methods were marked as safe public functions, an application developer could inadvertently write standard Rust code that causes memory corruption. The prerequisite is that the target application must instantiate a heap-backed ring buffer, call the IntoRef::into_ref method, clone the resulting reference wrapper, and allow the original reference to go out of scope or explicitly drop it.

A functional proof-of-concept demonstrating the flaw is presented below. In this scenario, we initialize a LocalHeapRB buffer, obtain a wrapper r, clone it twice (r2 and r3), and then drop the instances in sequence:

use oneringbuf::{IntoRef, LocalHeapRB};
 
fn main() {
    // Initialize heap-backed ring buffer
    let rb = LocalHeapRB::<usize>::from(vec![1, 2, 3]);
 
    // Create initial DroppableRef wrapper via safe API
    let r = <LocalHeapRB<usize> as IntoRef>::into_ref(rb);
    
    // Clone the wrapper, copying the raw pointer without updating reference counters
    let r2 = r.clone();
    let r3 = r.clone();
 
    // Dropping the original wrapper reclaims the backing storage using Box::from_raw
    drop(r);
 
    // Dropping r2 accesses/manipulates the deallocated storage
    drop(r2);
 
    // Dropping r3 attempts to reclaim the already deallocated heap block (Double Free)
    drop(r3); 
}

When this program is compiled and executed under AddressSanitizer (ASan), it immediately halts execution with a heap Use-After-Free diagnostic during the destruction of r2 or r3. If compiled under standard release configurations without sanitizers, the execution state becomes unpredictable, leading to heap corruption that could be manipulated for control flow hijack or denial of service depending on the allocator configuration.

Impact Assessment

The impact of this vulnerability is critical for any application relying on the memory safety guarantees of the Rust programming language. Because the vulnerability allows safe Rust code to trigger raw pointer deallocation, it bypasses the compiler's compile-time borrow checker checks. Consequently, applications that expose endpoints consuming or manipulating user-controlled input within these ring buffers may be vulnerable to remote exploits.

If an attacker can control the contents or timing of the deallocated heap space (heap spraying), they may be able to replace the deallocated OneRingBuf structure with malicious payloads. This could lead to arbitrary code execution within the context of the running application process. If code execution is not achieved, the vulnerability reliably causes application crashes, creating a vector for localized or remote Denial of Service (DoS).

The CVSS v4.0 base score is evaluated at 6.3 (Medium). This indicates that while the vulnerability represents a significant memory safety violation, exploitation is restricted by the requirement that the target program must actively employ the into_ref method of the oneringbuf crate. No active exploitation has been detected in the wild.

Remediation and Fix Completeness

The recommended remediation is to upgrade the oneringbuf crate dependency to version 0.8.0 or higher. This version completely eliminates the into_ref method from the public trait, which prevents the instantiation of the unsafe wrappers by external code.

We assess this fix as complete for downstream safe Rust consumers. By removing the public API entrypoint, the maintainer has enforced compile-time safety. Downstream code will fail to compile if it attempts to call into_ref. There are no alternative safe paths in the crate that expose DroppableRef or NonDroppableRef to external callers.

For deployments where immediate upgrading is not viable, developers should audit their codebases to ensure that IntoRef::into_ref is never called. If the trait method is used, it should be refactored to utilize native Rust borrowing mechanisms (such as standard references & or &mut, or standard smart pointers like Rc or Arc) instead of the crate's custom reference wrappers.

Official Patches

SkilfingrOfficial patch commit removing into_ref

Fix Analysis (1)

Technical Appendix

CVSS Score
6.3/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Affected Systems

oneringbuf (Rust crate)

Affected Versions Detail

Product
Affected Versions
Fixed Version
oneringbuf
Skilfingr
< 0.8.00.8.0
AttributeDetail
CWE IDCWE-416 (Use After Free)
Attack VectorNetwork
Attack ComplexityLow
Attack RequirementsPresent (Application using specific public API)
CVSS v4.06.3 (Medium)
Exploit StatusProof-of-Concept Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1203Exploitation for Client Execution
Execution
T1190Exploit Public-Facing Application
Initial Access
T1499Endpoint Denial of Service
Impact
CWE-416
Use After Free

The product references memory after it has been freed, which can lead to a crash, unexpected values, or code execution.

Vulnerability Timeline

Vulnerability reported by Athanasios Trispiotis
2026-05-27
Bug fixed in commit 643a24b3 and oneringbuf version 0.8.0 was released
2026-05-27
RustSec Advisory RUSTSEC-2026-0152 was issued
2026-06-01
GitHub Advisory GHSA-Q95X-7G78-RCCV was published
2026-07-08

References & Sources

  • [1]GitHub Security Advisory GHSA-q95x-7g78-rccv
  • [2]RustSec Advisory RUSTSEC-2026-0152
  • [3]Source Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
14 views•5 min read
•2 days ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
11 views•5 min read
•2 days ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
8 views•7 min read
•2 days ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
13 views•6 min read
•2 days ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
13 views•6 min read
•2 days ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
8 views•6 min read