Skip to content

Commit eca995a

Browse files
authored
Add RUSTSEC advisory for git2 (#2620)
1 parent 54e815b commit eca995a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crates/git2/RUSTSEC-0000-0000.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "git2"
5+
date = "2026-02-02"
6+
url = "https://github.com/rust-lang/git2-rs/pull/1213"
7+
informational = "unsound"
8+
categories = ["memory-corruption"]
9+
keywords = ["undefined-behavior"]
10+
11+
[versions]
12+
patched = [">=0.20.4"]
13+
```
14+
# Potential undefined behavior when dereferencing Buf struct
15+
16+
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,
17+
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.

0 commit comments

Comments
 (0)