Security Holes in CVS and Subversion Found
joe_bruin writes "News.com.com is reporting a two separate vulnerabilities that affect current versions of CVS and Subversion source control systems. Apparently, major users of these products (Linux and BSD distros, Samba, etc.) have been notified and have patched their systems." Update: 05/20 02:01 GMT by S : Clarification that there are separate issues for both CVS and Subversion.
...had better get proactive :)
/. to help out its fellow OSDN member*
God knows it took them ages to get their CVS server problems resolved a few years back.
*points
Homonyms are fun!
You're driving your car, but they're riding their bikes there.
Why don't highly important OSS projects use second level protection, like only allowing X user to modify files N Y P at a file system level? If such measures where taken the worst that could happen is a DOS attack.
This also helps to sell managed code for mission critical systems.
Hmm, so does this mean that we need to go looking for backdoors in every piece of code out there that uses a publicly visible CVS tree? Better get started!
I'm confused. I thought SVN was a rewrite of CVS...? Is the flaw based on a common library or something? Puzzled.
There is some merit to talking about some mission critical programs being moved to java, but of course you have to recognize that VM's are vulnerable to all sorts of hacks.
I do think that java probably is preferable as a language for avoiding buffer overflow vulnerabilities, especially for less experienced developers. It will be interesting to see how James will stack up with the notoriously holy (pun intended--damn I crack myself up) Sendmail. There ARE other examples of java in critical situations, I'm sure -- but none spring to mind.
I do constantly use java to write the shell stuff that I know someone is going to bang on -- just because I haven't seen a root exploit from a java process yet.
Nothing great was ever achieved without enthusiasm
According to the alerts below, Fedora Core 2 has these vulnerabilities, and furthermore, they can lead to arbitrary code execution:
FC2 CVS alert
FC2 Subversion alert
I can understand that a buffer overflow can cause a DoS (e.g. crashing a daemon), but how can it lead to arbitrary code execution with FC2's kernel-level stack protection? Is this just a cut and paste typo from alerts of older distros?
I actually did a small report on OSS a little while back; I'm about to fix it up for my good copy. Needless to say it's terribly written, and mostly based upon my own knowledge. However, I did come across a few of the problems you're describing.
You're right that the main problem with the "millions of reviewers" argument is that there is some question as to whether this review even happens; I personally hate reviewing my code. OSS, as it is, is either developed as a commercial product, and thus security is essential, or it is developed small-scale, where security is a very miniscule issue in comparison.
Logically, it makes sense that the more popular a piece of software is, the more it gets used and the source browsed. As well, the bugs that do get found can be fixed much faster than their commercial counterparts.
Although I've yet to see whether that argument is really true, it sounds logical to me.
Discworld.
Yes we are lazy and many of us want to have our name in the contributers list. That is the biggest reason for contributing to the code.
Debugging code is the quickest and easiest way into the contributers list.
Also when a project enters "frease" it's the ONLY way to get on the contributers list.
Having said that. The only real way to make sure the code is bug free is to make it really small.
The less code you have to manage the easier it is to see the bugs.
But you'll never make a powerful operating system in 10 lines or less.
Of course not. This is not the first vulnerability either.
Just because you found a bunch of problems a while ago doesn't mean you shouldn't look at the code again later.
Dr Hos'e may have indulged in the trollish arts in the past, but he does have a point:
how many otherwise great programmers and source control systems gurus cannot post bugfixes to CVS and Subversion codebases thanks to Bitkeeper's EULA
I've received patches from kernel developers for my open source programs. The BK licence makes them give up the right to file CVS or Subversion bug reports, in order to use BK for free.
I don't think CVS or Subversion would suit Linus's style, but maybe Arch or Darcs will in the future.
I run a CVS server on behalf of a client on a FreeBSD box. It is running in pserver mode, and is launched by cvsd , which is a chroot() jail for CVS.
It is not clear from the sensationalistic news story what an administrator should do, or whether my particular configuration is vulnerable. Could a more knowledgeable person please summarize the issues involved, or point to the original vulnerability report so I can evaluate my risk?
Thanks,
Schwab
Editor, A1-AAA AmeriCaptions
You mean like sourceforge?
I'm quite happy with saying that SourceForge should reassess their security.
Anonymous CVS access is a pretty import thing to alot of projects.
There are much better options; CVSup and rsyncing tarballs are probably the best.
Tarsnap: Online backups for the truly paranoid
Hasn't been true for a long time. Now CVS reads/writes directly, with no RCS process active.
Sorry, meant to say RCS format plain text files.
But even if that were still the case, saying "CVS is a database" is like "airplanes are wings".
Database
I do not agree with you. Just like I wouldn't agree if you said filesystems weren't databases. For crying out load, my blog is a database!
Almost all projects that publish anoncvs also publish web pages, and putting additional files on the web site is much less risky than running a whole new server.
subversion uses apache, which means you don't have to have a whole new server. You have a point about being able to write simple read-only HTTP servers, but in order to run a version control system you're going to have to have writing somewhere, and distribution of the server isn't going to help.
As i pointed out before, it only makes more of the system untrustworthy. With the client/server model you can't trust input from the client, but with distribution you can't trust the client and you can't trust anything coming from the other servers.
The version control system doesn't trust the web server, or receive any input from the network.
Thankyou for trolling!
so you're going to have a non-networked distributed version control system! :o)
Look who's trolling now.
the same Anon Cowardsubversion uses apache, which means you don't have to have a whole new server.
Subversion uses Apache2, which *is* a whole new server from what the majority of people are running these days. Subversion deployed under Apache requires you to run a new DAV module under Apache -- and there has been quite a number of exploitable vulnerabilities in the neon DAV code over the last few years. Publishing a public Subversion repo requires you to run 10,000s of lines of new network-accessible code.
Also, Subversion requires that Apache have filesystem write access to the db files in the repo. So all in all it is a pretty unattractive proposition.
in order to run a version control system you're going to have to have writing somewhere
Writing in Darcs or Arch only occurs over SSH by the one person who owns the archive. There is no increased exposure. Anyone who is reading the anonymous archives can mail me diffs, as before. Now, perhaps they could try to break into my mailserver but they could try that before too.
I don't think your concerns about "more of the system being untrustworthy" reflect an understanding of the way these systems actually work. But if you want to give a proper argument please do.
Let me draw you a picture.
1: Project before using version control: one read-only web server, accessible over ssh, developer has an email account.
2A: After adopting darcs: no increase in exposure. Developer publishes stuff by pushing it onto the web server over SSH, just as they do for the web site. Developer gets patches by email.
2B: Contrariwise, after using CVS or Subversion, in the safest possible way to use them: A new service, of 10000s of lines of C code runs on the public server, accepting connections from arbitrary clients. The service needs to be able to write to files on the server. It is likely that the canonical repository resides on the same machine, so you put your crown jewels on the very machine which just opened up a new potential vulnerability.
To me, scenario 2B looks worse than 2A.