potential path traversal issue in v3 with wild repos

181 views
Skip to first unread message

Sitaram Chamarty

unread,
Oct 9, 2012, 7:45:06 PM10/9/12
to gitolite, gitolite...@googlegroups.com, Stephane Chazelas
Hello all,

I'm sorry to say there is a potential path traversal vulnerability in
v3. Thanks to Stephane (copied) for finding it and alerting me.

Can it affect you? This can only affect you if you are using wild
card repos, *and* at least one of your patterns allows the string
"../" to match multiple times. (As far as I can tell, this does not
affect v2).

How badly can it affect you? A malicious user who *also* has the
ability to create arbitrary files in, say, /tmp (e.g., he has his own
userid on the same box), can compromise the entire "git" user.
Otherwise the worst he can do is create arbitrary repos in /tmp.

What's the fix? The fix has been pushed, and tagged v3.1. This patch
[1] is also backportable to all v3.x tags, in case you are not ready
for an actual upgrade (it will have a slight conflict with v3.0 and
v3.01 but you should be able to resolve it easily enough; with the
others there is no conflict.)

My sincere apologies for the fsck-up :(

[1]: it's not the top-most commit; be careful if you want to 'git
cherry-pick' this to an older tree.

--
Sitaram

milki

unread,
Oct 10, 2012, 5:00:59 PM10/10/12
to gito...@googlegroups.com, gitolite...@googlegroups.com, Stephane Chazelas
CVE-2012-4506 has been assigned for this
Reply all
Reply to author
Forward
0 new messages