Skip to content

Verify ref_pkt's are long enough#4696

Merged
pks-t merged 1 commit intolibgit2:masterfrom
nelhage:git_pkt_ref-check-len
Jun 25, 2018
Merged

Verify ref_pkt's are long enough#4696
pks-t merged 1 commit intolibgit2:masterfrom
nelhage:git_pkt_ref-check-len

Conversation

@nelhage
Copy link
Copy Markdown
Contributor

@nelhage nelhage commented Jun 24, 2018

If the remote sends a too-short packet, we'll allow len to go
negative and eventually issue a malloc for <= 0 bytes on

pkt->head.name = git__malloc(alloclen);

This was found by an oss-fuzz integration I'm working on.

If the remote sends a too-short packet, we'll allow `len` to go
negative and eventually issue a malloc for <= 0 bytes on

```
pkt->head.name = git__malloc(alloclen);
```
@pks-t pks-t merged commit 983f72c into libgit2:master Jun 25, 2018
@pks-t
Copy link
Copy Markdown
Member

pks-t commented Jun 25, 2018

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants