git2 has potential undefined behavior when dereferencing Buf struct
Historical advisory saved 24 Oct 2026 13:19:54 UTC. The publisher may have updated it since then. Latest advisory.
osv · GHSA-j39j-6gw9-jw6h
PublishedIf the Buf struct is dereferenced immediately after calling new() or default() on the Buf struct, a null pointer is passed to the unsafe function slice::from_raw_parts. According to the safety section documentation of the function, data must be non-null and aligned even for zero-length slices or slices of ZSTs. Thus, passing a null pointer will lead to undefined behavior.
- Source published
- 4 Feb 2026 20:36:04 UTC
- Source modified
- 10 Sep 2026 03:50:35 UTC
- Saved here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V4 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U
Publisher rating · LOW