Skip to contentSkip to conversation

security flaw with smart http

DISCUSSION Ivan Kanis 5 participants 7 messages Jun 15, 2016

lore
Share & tools
lore

Ivan Kanis

author
#0 lore raw

Hi,

I think we found a security flaw with git http smart backend. We are running git version 1.0.7.4 on our server. Adding random words after the password and the authentication still succeeds.

It's very easy to reproduce, say the username is ivan and the password is the word secret:

% git pull
Username: ivan
Password: secretfoo
Already up to date.

Pull succeeds although the password is wrong! Can someone try to reproduce with a more up to date git server?

Signature · 2 lines
Ivan Kanis
http://ivan.kanis.fr
#1 lore raw
Quoted 3 lines · Ivan Kanis

I think we found a security flaw with git http smart backend. We are running git version 1.0.7.4 on our server. Adding random words after the password and the authentication still succeeds.

git http-backend does not handle authentication or authorization. This is handled in your web server. You should consult your web server's documentation, and maybe its configuration files.

Quoted 10 lines

It's very easy to reproduce, say the username is ivan and the password is the word secret:

% git pull
Username: ivan
Password: secretfoo
Already up to date.

Pull succeeds although the password is wrong! Can someone try to reproduce with a more up to date git server?

Git is freely available under the GPLv2 license. I believe it is possible for you to attempt experiments yourself with more up-to-date versions if you wish.

#2 lore raw
Quoted 8 lines · Shawn Pearce
Quoted 3 lines · Ivan Kanis

I think we found a security flaw with git http smart backend. We are running git version 1.0.7.4 on our server. Adding random words after the password and the authentication still succeeds.

git http-backend does not handle authentication or authorization. This is handled in your web server. You should consult your web server's documentation, and maybe its configuration files.

Very good advice.

Quoted 3 lines

Git is freely available under the GPLv2 license. I believe it is possible for you to attempt experiments yourself with more up-to-date versions if you wish.

And the result is very unlikely to change, if the only change between the earlier experiment and the next one is the vintage of Git used, as the part that makes authentication decision is Ivan's webserver and its configuration, which is not going to change between the two experiments.

I do not recall ever releasing 1.0.7.4, nor having smart http support before v1.6.6, by the way.

#3 lore raw
Quoted 2 lines

I do not recall ever releasing 1.0.7.4, nor having smart http support before v1.6.6, by the way.

It sounds very likely that he meant 1.7.4 no?

Philippe

author
#4 lore raw

Philippe Vaucher <[email protected]> a écrit

Quoted 4 lines
Quoted 2 lines

I do not recall ever releasing 1.0.7.4, nor having smart http support before v1.6.6, by the way.

It sounds very likely that he meant 1.7.4 no?

It's compiled from a 1.7.0.4 tar ball, amusingly git --version says 1.0.7.4

Signature · 7 lines
Ivan Kanis
http://ivan.kanis.fr

Par prêchements, le peuple on peut séduire ;
Par marchander, tromper on le peut bien ;
Par plaiderie on peut manger son bien.
    -- Clément Marot
#5 lore raw
Quoted 8 lines · Ivan Kanis

Philippe Vaucher <[email protected]> a écrit

Quoted 4 lines
Quoted 2 lines

I do not recall ever releasing 1.0.7.4, nor having smart http support before v1.6.6, by the way.

It sounds very likely that he meant 1.7.4 no?

It's compiled from a 1.7.0.4 tar ball, amusingly git --version says 1.0.7.4

Could it be that there's a typo in the "version"-file of that release? AFAICT, the tag at github looks correct (no "version"-file, but what's in GIT-VERSION-GEN looks correct). Unfortunately, the current official release-archive at google code
(http://code.google.com/p/git-core/downloads/list) doesn't contain that particular release, nor does the old official release-archive
(http://www.kernel.org/pub/software/scm/git/), so it's difficult to tell.

author
#6 lore raw
In reply to Junio C Hamano

Junio C Hamano <[email protected]> a écrit

Quoted 7 lines
Quoted 5 lines · Shawn Pearce
Quoted 3 lines · Ivan Kanis

I think we found a security flaw with git http smart backend. We are running git version 1.0.7.4 on our server. Adding random words after the password and the authentication still succeeds.

Quoted 5 lines
Quoted 3 lines

git http-backend does not handle authentication or authorization. This is handled in your web server. You should consult your web server's documentation, and maybe its configuration files.

Very good advice.

In case someone is reading this thread I confirm the problem comes from Apache.

Signature · 4 lines
Ivan Kanis, Release Manager, Vision Objects,

Le mal est un mulet : il est opiniâtre et stérile.
    -- Victor Hugo