Skip to content

RUSTSEC-2026-0183 Potential undefined behavior when calling Remote::list()

Unknown
Published
Updated
Exploit status
No public exploit known

Description

When calling Remote::list() for a remote of a git repository, when that remote does not advertise any references, git2 passes a null pointer to the unsafe function slice::from_raw_parts(). Based on the safety section documentation of function, data must be non-null even for slices of length zero. Thus, the use of a null pointer leads to undefined behavior.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
crates.io git2(crates.io) >= 0.0.0-0, < 0.21.0 0.21.0 Fixed

Affected products

ProductAffected versionsFixed in
crates.io git2(crates.io) >= 0.0.0-0, < 0.21.0 0.21.0

References