This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate cubecl-common

Dependencies

(33 total, 2 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 backtrace^0.30.3.76up to date
 bytemuck^1.16.11.25.2up to date
 bytes ⚠️^1.101.12.1maybe insecure
 cfg-if^1.0.01.0.4up to date
 ciborium^0.2.20.2.2up to date
 derive-new^0.7.00.7.0up to date
 derive_more^22.1.1up to date
 dirs^6.0.06.0.0up to date
 embassy-futures^0.1.10.1.2up to date
 embassy-time^0.50.5.1up to date
 float4^0.20.2.0up to date
 float8^0.70.7.0up to date
 futures-lite^2.3.02.6.1up to date
 half^2.52.7.1up to date
 hashbrown^0.160.17.1out of date
 log^0.4.220.4.33up to date
 num-traits^0.2.190.2.19up to date
 oneshot^0.2.10.2.1up to date
 parking_lot^0.12.50.12.5up to date
 portable-atomic^1.111.14.0up to date
 portable-atomic-util^0.2.40.2.7up to date
 rand^0.10.00.10.2up to date
 sanitize-filename^0.60.6.0up to date
 serde^1.0.2041.0.229up to date
 serde_bytes^0.11.170.11.19up to date
 serde_json^1.0.1191.0.151up to date
 spin^0.10.00.12.2out of date
 toml^11.1.3+spec-1.1.0up to date
 tracing^0.1.430.1.44up to date
 tynm^0.20.2.0up to date
 wasm-bindgen-futures^0.4.450.4.76up to date
 web-time^1.1.01.1.0up to date
 xxhash-rust^0.80.8.18up to date

Dev dependencies

(5 total, all up-to-date)

CrateRequiredLatestStatus
 ciborium^0.2.20.2.2up to date
 criterion^0.80.8.2up to date
 dashmap^6.1.06.2.1up to date
 tempfile^3.203.27.0up to date
 test-log^0.20.2.21up to date

Security Vulnerabilities

bytes: Integer overflow in `BytesMut::reserve`

RUSTSEC-2026-0007

In the unique reclaim path of BytesMut::reserve, the condition

if v_capacity >= new_cap + offset

uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB.

This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks.

PoC

use bytes::*;

fn main() {
    let mut a = BytesMut::from(&b"hello world"[..]);
    let mut b = a.split_off(5);

    // Ensure b becomes the unique owner of the backing storage
    drop(a);

    // Trigger overflow in new_cap + offset inside reserve
    b.reserve(usize::MAX - 6);

    // This call relies on the corrupted cap and may cause UB & HBO
    b.put_u8(b'h');
}

Workarounds

Users of BytesMut::reserve are only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.