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 · RUSTSEC-2026-0008
Publishedif 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.
- Source published
- 2 Feb 2026 12:00:00 UTC
- Source modified
- 5 Feb 2026 06:56:18 UTC
- Saved here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.