Advisory

RUSTSEC-2026-0008

Also known as: GHSA-j39j-6gw9-jw6h

Summary

Potential undefined behavior when dereferencing Buf struct

Details

if we dereference the Buf struct right after calling new() or default() on Buf struct, it passes Null Pointer to the unsafe function slice::from_raw_parts. Based on the safety section documentation of function,
data must be non-null and aligned even for zero-length slices or slices of ZSTs. Thus, passing Null Pointer will lead to undefined behavior.

Severity

Not rated by the source.

Dates

Published
2026-02-02 12:00 UTC
Modified
2026-02-05 06:56 UTC

Affected packages and fixes

git2

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.20.4 (semver)

Fixed versions

0.20.4

Fix

  • Fixed version 0.20.4
    cargo update -p git2 --precise 0.20.4

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences