Skip to content

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

Description

@github-actions
Details
Package git2
Version 0.20.4
Warning unsound
URL rust-lang/git2-rs#1250
Patched Versions >=0.21.0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions