Thanks to visit codestin.com
Credit goes to github.com

Skip to content

security updates for v0.25 #4076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 9, 2017
Merged

security updates for v0.25 #4076

merged 9 commits into from
Jan 9, 2017

Conversation

carlosmn
Copy link
Member

@carlosmn carlosmn commented Jan 9, 2017

This fixes a buffer boundary check error and a certificate validity check which can be bogus under certain conditions.

tiennou and others added 9 commits January 6, 2017 17:09
Make sure that the callbacks do also get a 'valid' value of zero when
the certificate we're looking at is in valid and assert that within the
test.
Each packet line in the Git protocol is prefixed by a four-byte
length of how much data will follow, which we parse in
`git_pkt_parse_line`. The transmitted length can either be equal
to zero in case of a flush packet or has to be at least of length
four, as it also includes the encoded length itself. Not
checking this may result in a buffer overflow as we directly pass
the length to functions which accept a `size_t` length as
parameter.

Fix the issue by verifying that non-flush packets have at least a
length of `PKT_LEN_SIZE`.
The Git protocol does not specify what should happen in the case
of an empty packet line (that is a packet line "0004"). We
currently indicate success, but do not return a packet in the
case where we hit an empty line. The smart protocol was not
prepared to handle such packets in all cases, though, resulting
in a `NULL` pointer dereference.

Fix the issue by returning an error instead. As such kind of
packets is not even specified by upstream, this is the right
thing to do.
We must make sure that we're getting a certificate error from the
library so we know that we're testing the right thing.
None of our crypto backends actually reject RC4 as a cipher so don't
test for it and instead keep it as something we'd like to do.
@carlosmn carlosmn merged commit 2fcb870 into maint/v0.25 Jan 9, 2017
@carlosmn carlosmn deleted the cmn/sec-update-25 branch January 9, 2017 20:57
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.

3 participants