Security Holes in CVS and Subversion Found 250
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.
Sourceforge... (Score:5, Interesting)
God knows it took them ages to get their CVS server problems resolved a few years back.
*points
Re:Sourceforge... (Score:5, Funny)
Re:Sourceforge... (Score:5, Funny)
No, it means they'll be changing their name to ForgeSource
Re:Sourceforge... (Score:2, Funny)
h4(|{3Ð b $n00p, 94nÐ4 4nÐ r3Ð 7h3 q33r. 0v3 0 m4m4 0n9 71m3!
Re:Sourceforge... (Score:5, Funny)
Re:Sourceforge... (Score:5, Funny)
Re:Sourceforge... (Score:5, Interesting)
Developers have access over SSH, and hopefully only have access to their project. There are obviously some concerns with malicious developers or people breaking into a developer's account, but the chances are pretty slim.
I don't think this was mentioned anywhere else, but the original annoucement [e-matters.de] includes a note about SourceForge finding a problem with the security patch breaking compatibility with some versions of WinCVS and TortoiseCVS.
Re:Sourceforge... (Score:4, Interesting)
Re:Sourceforge... (Score:5, Insightful)
Who ever said only closed source was vunrable? (Score:2, Informative)
Re:Who ever said only closed source was vunrable? (Score:2)
Er.. I don't think I've heard anyone except shouty 12 year olds with no clue say that.
Thankfully, I use Visual Source Safe (Score:5, Funny)
Just goes to show... (Score:2, Insightful)
Developers and admins have to keep security aware constantly, which is one of the hardest problems in real production environments.
Re:Just goes to show... (Score:5, Insightful)
Re:Just goes to show... (Score:2)
Don't you do this already? If not, you're behind the curve. MS Fanboys are quick to post this and quick to mod it up.
It's a pitty it misses the point (not that there aren't Linux fanboys missing the point too).
Re:Just goes to show... (Score:5, Insightful)
I've been thinking through the dynamics of OSS. For a moment, let's forget Linux, Apache, FreeBSD and the four or five other "big guys" out there (the reason: they seem to be managed much like commercial software, in a hierarchial, closed-group fashion, just without the keeping the code a secret part).
For the vast majority of little OSS that is in so many systems, large and small, is there really any empirical proof that OSS is more secure than proprietary software? I've been wondering if it isn't possible that its even less secure.
The reason is the dynamics of programmer laziness (and I'm a programmer myself.... I know all about it). Combing through code looking for buffer overflows is tedious and repetative. How many programmers really do it all the time, every time?
I also understand the "millions of eyeballs" argument, but doesn't that really apply again to the "big guys." Does anyone really believe that literally millions of people have done detailed reviews of the myriad small programs and libraries present on a typical open source operating system?
I don't know, perhaps I'm wrong, but I'm wondering if there may not be a group-think problem here. I don't look at those tools, because everyone else is, and I'm lazy. I may poke through kernel source because it interests me, but TinyXML source does not. In a commercial environment, I make developers do it, but, except on the few big OSSes that are run basically like commerical operations, how are we really sure it is more, and not less, secure?
Re:Just goes to show... (Score:5, Insightful)
In every commercial software house I've been in the source has been available for my review, but I wasn't given time to do it, nor was anyone else. In fact while I was allowed to read other's code, I was rarely allowed to change it, and I wasn't encouraged to suggest changes.
In open source I've read a lot of code, not just for fun, but because I'm not limited in the code I can change so I tend to change code in larger parts. That means I have to understand larger parts.
Now I'm not smart enough to have found a security flaw (yet?), but I have at least read it. Despite working 40 hours programing for years, I've found more opportunity to read other code in the open source movement. I've read some kernel code (didn't understand it), and a lot of KDE code (resulted in a few patches). I've also read code for a few other systems, but didn't get around to doing anything.
Re:Just goes to show... (Score:5, Insightful)
While you may be correct -- Open Source may very well be riddled with just as many bugs -- the argument shouldn't be focused on which is more secure but rather on which is more fixable. Open Source is rendered a benefit that closed source lacks: the ability to fix the source yourself. Compare the security flaws released in the last six months on sites like CERT--generally, Open Source outfits release patches much sooner than commercial counterparts. Sure, this doesn't always hold true, but Open Source grants yet another benefit: Users of Open Source are, IMO, more aware of the implications and importance of security and are thus more proactive when an exploit is discovered.
And, again, I can't stress the "fix it yourself" argument enough!
Re:Just goes to show... (Score:4, Insightful)
Discovery of a vulnerability in say CVS or IIS does not mean every installation in the world will be compromised immediately. It means that the clock starts ticking. If a fix is released and applied more quickly, then there is less risk that any given machine will be compromised. Look at Schneier's "exposure envelope" model.
Historically open source has done reasonably well, though not perfectly, at releasing fixes very soon after vulnerabilities become known to the author. Open source projects tend to also be more responsive to reports, which encourages security reporters to do the right thing and report to the authors, knowing that they will get a quick response and proper credit.
There are many reports of proprietary companies sitting on vulnerabilities for more than a year. I have seen Microsoft sit on one for a couple of months. That is an enormous exposure. Being able to fix it yourself may be cold comfort but it's better than having your machines rooted.
Re:Just goes to show... (Score:3, Insightful)
Why would companies react slowly? They ought to have all the capabilities of free projects, plus money. How is it possible that they perform worse?
I don't know, but I have some theories:
- Companies tend to grow bureaucracy, which prevents fast action. Open source developers can just commit the change and be done.
- Companies don't like to admit they had mistakes.
- Vulnerability reports in open source are more likely to point out where the problem is, which makes it easier to fix.
- Open
Source Compatibility vs. Binary Compatibility (Score:3, Insightful)
If you have a vuln. in a Debian package, you do
apt-get update && apt-get -u install package
You'll see that (especially if it's a library) all kinds of other packages will automatically be upgraded
The same will not happen in the Win32-world.
Re:Just goes to show... (Score:2, Interesting)
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
Re:Just goes to show... (Score:2, Interesting)
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
Re:Just goes to show... (Score:4, Insightful)
I think a sizeable number of people read through source code as a way of educating themselves. OSS code is (as you point out, rightly or wrongly) seen as a source of very well-written code, and if I was going to teach myself something from someone else's source code, I'd be inclined to use OSS code as a starting point.
As these people educating themselves start to learn about what e.g. a buffer overflow is, what it looks like and how to avoid it, they'll think back to the OSS code they've read through and either mentally congratulate the author or possibly notify him/her to say their code has a security hole in it. I'm not sure: OSS code may even be used as a teaching tool in universities, in which case there will be lots of reviewers.
This reviewing-as-you're-learning approach would probably only apply to big OSS projects such as Apache or the Linux kernel I can't imagine a lot of people are suddenly going to start teaching themselves about buffer overflows using e.g. the Ethereal source. However, it's projects such as Apache and Linux that would be most at risk from buffer overflows; a buffer overflow in Ethereal, while it may be important, isn't likely to lead to lots of exploits in the real world.
Good point though - I'll be interested in what other replies you get
Re:Just goes to show... (Score:3, Informative)
I have two software products, very small, that I've put out into the wild. I licensed them under BSD, so it's open source. My program PHPortfolio [outshine.com] had a weakness in version 1.0. It only worked if installed at the top
Re:Just goes to show... (Score:3, Funny)
Of course not! There are thousands of slashdot posts asserting that it's not true. If that doesn't constitute proof, I don't know what does.
Re:Just goes to show... (Score:5, Insightful)
Not by a long shot.
Python, most Scheme implementations, Haskel, ADA, and many, many languages provide similar safety features.
As you say, though, pity they're not more often used.
Re:Just goes to show... (Score:3, Insightful)
Considering the speed improvements in both the interpreters for these languages, and general processors, I'm suprised more network services (smtp, web, ftp) aren't being written either entirely in these languages, or with a mixture of scripting and native C modules for the areas that need better performance.
There's a few examples that I've seen out there that already do this, like Zope [zope.org] and Ao [aolserver.com]
Re:Just goes to show... (Score:2)
C and C++ are two of the very few languages which do not do automatic bounds checking. Their use should be relegated to low-level divers and OS kernels.
In the current climate, it is just plain foolish to use a language without bounds checking in a security critical capacity.
Re:Just goes to show... (Score:4, Insightful)
Ironically, CVS was originally a Perl program until a C version was needed to make it real software.
FALSE! You little history revisionist you. (Score:5, Informative)
You just made a double-fault.
Patently False
source: CVS-RCS-HOWTO [linux-universe.com]
It's NOT! It's something else. irony misuse [google.com]Neither of the bugs were bounds-checking related.. (Score:3, Informative)
Re:Just goes to show... (Score:3, Insightful)
Lots and lots of programs are written in Java. The OSS community hasn't embraced Java, though, because it's not open-source.
Java also doesn't satisfy the "Lookie I can run stuff on my 486!" fetish quite as well as C does.
Based on what I've read about Perl 6 and Mono, I would say that Sun has a limited amount of time to open-source Java before the window of adoption closes as far as the open-source crowd is concerned. Obviously the tools and infrastr
Second Level security? (Score:4, Interesting)
This also helps to sell managed code for mission critical systems.
Re:Second Level security? (Score:5, Interesting)
Re:Second Level security? (Score:5, Informative)
The reason is simple. If a program is to allow any users (say, only those who are authorized to modify certain files), the program itself must have adequate permissions to modify those files. If they are system files, the program must be suid root.
Heap and buffer overflow attacks--like the sort discovered in CVS--allow unprivileged users to execute arbitrary code with the permissions of the program. Since the program itself has been hijacked, it bypasses exactly the sort of second-level protection you suggest.
Sandboxing techniques aim to counteract this by running the program in a "protected" environment, thus externalizing these kinds of checks you suggest. However, much research has shown that sandboxes themselves can be vulnerable, incomplete (think race conditions), and so on.
Security is a hard problem, and even common attack techniques are, from an algorithmic perspective, highly subtle. Simple answers often do not work.
Re:Second Level security? (Score:3, Interesting)
But CVS and Subversion have no need to write to a "system" file, so this protection can work fine. And indeed, every serious CVS server admin has done something like this.
(Much more important, of course, is that CVS- or any important server- be run behind a separate, simpler server handling authentication. Usually ssh)
However, much research has shown that sandboxes themselves can be vulnera
Re:Second Level security? (Score:2)
Of course, anything that CVS or Subversion is able to write to would be data a patient attacker would like to modify.
Re:Second Level security? (Score:3, Informative)
Linux kernel development process thwarts subversion attempt [newsforge.com]
The attack failed because, basically, the CVS repositories for the linux kernel are not the real source trees -- they are just mirrors of people's bitkeeper trees.
And here is a Trojan FTP attack [megasecurity.org]. Of course CVS and FTP are different protocols, but the idea is similar -- inject malware into the OSS development stream.
Re:Second Level security? (Score:3, Interesting)
2 should never happen. It is insecure by design.
1 is preferable. Access happens as those needing access, system level. 1 however, for traditional Unix, requ
Re:Second Level security? (Score:3, Funny)
P class or NP class?
Re:Second Level security? (Score:4, Insightful)
apart from that, many high-profile OSS project use such an approach that only senior developers (i.e. those who have proven themselves reliable in the past) are allowed write access to the repositories. the most obvious case being the linux kernel itself, where most (if not all) patches go through the top level maintainers.
but instead of just restricting write access (which as i pointed out above can be a hinderance to OSS projects) you can introduce a slashdot-karma-like moderation that ensures that any added code was reviewed by another developer before it is "submitted" into the real repository.
anyway, by what criterium would you give out privileges to single users and restricted file sets?
managing huge OSS project is an unbelievably complex task and so far, most of the projects have proven to be pretty responsive towards security issues. but successful intrusions at debian, gnu, etc have shown that one definite draw-back of a completely open community is the risk of shipping planted, evil code!
well, time for my daily code-review
Re:Second Level security? (Score:5, Insightful)
because the whole idea of the "bazaar model" is to allow anyone to contribute
Almost no Open Source developer allows relative strangers write-access to a CVS repository. In reality, "bazaar" development allows anyone to create changes, but it's still up to the original author (or her trusted friends, or a declared maintainer) to actually add them to the codebase. (If they refuse, then somebody can decide to fork a new project containing the desired change)
Observe how Linux works: millions of people can create changes, which they can send to one of 20 people for possible inclusion. If approved, then the patch is sent onward to the single person maintaining that kernel release (Linus, Marcello, or someone like that).
That's why it has been broadly noted that CVS is sub-optimal for managing large Free/Open projects. The one master server is too much of a bottleneck/vulnerability. Competitors like BitKeeper have arisen to try making the management of source code as distributed as writing it.
(Amusingly, BitKeeper supports OSS style development but is not itself open source)
Re:Second Level security? (Score:3, Insightful)
With cvs, this is possible if the filesystem uses acl's. If not, there are only the standard user, group and other categories, so there are only 3 possible access levels. Additionally, when a new file is created, the admin will have to set the permissions on these.
I believe it would be
Re:Second Level security? (Score:5, Insightful)
Oh my! Here's another poster with no idea how OSS actually works.
Guess what: there really IS a small list of trusted people, and somebody works manage which of the million possible helpers deserves to
Handling "millions" is actually a simple problem for a computer programmer. Any good coder is familiar with binary tree division, which allows you to handle lists of any size with just a few (max ~7) layers of hierarchal control.
If you want to restrict contributions to people you really trust then don't put your CVS repository on a public server.
Try this: go over to sourceforge.net, pick a random project, and add a file into the CVS tree [sourceforge.net]. Good luck, you'll need it. The only way you can contribute is to convince a live human project-member that your code is worthwhile.
Great! (Score:5, Funny)
Re:Great! (Score:5, Funny)
open source databases?? (Score:4, Insightful)
Flaws drill holes in open-source databases
Geez, this is why open source needs a frickin' PR department. These flaws DRILL HOLES!!! Into Open source DATABASES!! OMGLOLWTF??!111
CVS and its pudgy cousin Subversion are not databases. They may use the *concept* of a database *internally*, but then again so do iTunes and Emacs and probably a bunch of other programs.
Does CNET not understand the concept of a version control system? Hint: only people who know what they are use them in the first place.
Regardless, I only use these things via SSH, and have never recommended running CVS with pserver or Subversion via Apache or its server, except on a well-firewalled LAN. I think that's the common practice anyway.
Pretty good rule of thumb: if you can run the service over an SSH tunnel, DO IT! Don't assume Yet Another Server Daemon is secure. Then you just have to keep an eye out for SSH exploits (which you should be doing anyway since SSH bugs are more serious than bugs in TEH OPEN-SORCE DATABASS anyway!).
Re:open source databases?? (Score:3, Informative)
CVS uses RCS as a back-end store. Subversion uses Berkley DB as a back-end store.
Re:open source databases?? (Score:5, Insightful)
Re:open source databases?? (Score:2, Informative)
Hasn't been true for a long time. Now CVS reads/writes directly, with no RCS process active. But even if that were still the case, saying "CVS is a database" is like "airplanes are wings".
Re:open source databases?? (Score:3, Interesting)
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 [reference.com]
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!
Re:open source databases?? (Score:3, Insightful)
repository
1. See data dictionary.
2. The core of a CASE tool, typically a DBMS where all development documents are stored.
Shit, seems like calling it a '..source database' isn't too far off the mark for a news outlet. Better than 'the fabric of the internet' or something gay.
give these guys a break.
Re:open source databases?? (Score:3, Informative)
repository
1.
2.
Re:open source databases?? (Score:2, Funny)
I concur about emacs. Not only it is a database but it can also do this and that. Now if only I could make my emacs to brew coffee.
Re:open source databases?? (Score:3, Funny)
you can. there is a coffee.el package/ msg00368.html
http://list-archive.xemacs.org/xemacs-beta/199909
Re:open source databases?? (Score:2)
Someone/group that would volunteer or work on a nominal per-hour fee to get well-worded and accessible info out to the masses?
If there isn't, it sounds like there might be an opportunity out there for groups smaller than someone like RedHat, IBM, Sun, etc...
Re:open source databases?? (Score:4, Informative)
Demonstrably [netbsd.org] false [openbsd.org].
Good news for Samba... (Score:2, Informative)
"The Samba Project, which maintains file server software that integrates with Microsoft Windows networks, uses Subversion. However, the project's developers were warned about the security issue before it was made public, Esser noted."
- By Robert Lemos Staff Writer, CNET News.com
uh oh! (Score:2, Funny)
Re:uh oh! (Score:4, Funny)
Re:uh oh! (Score:2, Funny)
You go on his "bad" list. And as Linus says: Don't mess with penguins.
Re:uh oh! (Score:2)
Another security flaw found (Score:5, Funny)
Oh wait..thats not right...
Take 2
this just goes to show that with so many eyes viewing the software that bugs will be found and corrected, and we do not know how many undetected bugs are in commercial software.
Re:Another security flaw found (Score:5, Insightful)
Nor do we know how many undetected bugs there are in open-source software. I guess that's why they are...undetected
pserver only (Score:5, Insightful)
Re:pserver only (Score:3, Insightful)
Re:pserver only (Score:3, Interesting)
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.
Re:pserver only (Score:3, Insightful)
Do you actually run projects at SourceForge? You have to use a ssh tunnel to be able to write to any project repository.
Hmm (Score:2)
CVS and Subversion? (Score:5, Funny)
Laugh, it's a joke.
FC2 (Score:4, Interesting)
FC2 CVS alert [lwn.net]
FC2 Subversion alert [lwn.net]
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?
Re:FC2 (Score:3, Informative)
So in short while exec-shield in this case won't prevent the overflow (as it can with ASCII stack based overflows), it does make
What Do I Do? (Score:3, Interesting)
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 [tudelft.nl], 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
Re:What Do I Do? (Score:4, Informative)
Just update CVS from FreeBSD whenever they apply the fix. If FreeBSD haven't made a new release yet, then you might want to turn off public access until it's fixed.
The issue has been announced via the normal announcement channels for FreeBSD and an advisory which explains what to is available [freebsd.org]. I actually got the FreeBSD advisory before I heard about it on slashdot.
An argument for distributed version control (Score:4, Informative)
Whenever you allow an untrusted client to control code running on your server, there is a risk of a compromise.
The distributed version control systems Darcs [abridgegame.org] and Arch [gnuarch.org] show a better way. Read-only access requires only some read-only files published over HTTP. Since most projects already have a web site, this means there is no increase in the network services that need to be offered.
Once those files are downloaded, the anonymous user can get updates, make their own patches, branch -- all the facilities allowed by anonsvn/anoncvs and more.
Re:An argument for distributed version control (Score:3, Interesting)
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
good thing only major users are safe... (Score:4, Informative)
Well, it's a damn good thing the *major users* are already safe. I can rest easy tonight knowing that just because I am a "Linux and BSD distro, Samba, etc.) user that I am safe.
Sorry, my sarcasm bit must be stuck.
Re:Backdoors in our projects (Score:2)
Re:Backdoors in our projects (Score:2)
You need brains not eyeballs. Or infinite eyeballs not a million (chance that one eyeball mutates into uberhacker).
Re:Backdoors in our projects (Score:2)
Re:PR department you say? (Score:2)
Am I the only one who sees a bit of a contradiction here?
Re:PR department you say? (Score:2)
Re:PR department you say? (Score:2)
There is a reason no one has ever built a statue to a committee.
Re:If CVS was implemented in Java... (Score:3, Insightful)
while all these buffer overflows, etc are more than a nuissance in C/C++, many of the bugs stem from a misunderstanding on the part of the programmer (i.e. use of deprecated functions,
languages featuring garbage collection, length encoded strings, array bound checks, etc are hopefully the future, bu
Re:If CVS was implemented in Java... (Score:2)
I think it's a little unkind to refer to C as archaic -- it still most assuredly has a place; that place just isn't doing application-level development. Someone has to maintain your JVM, for example, and Java quite certainly isn't the language to do it in.
Re:If CVS was implemented in Java... (Score:3, Interesting)
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. [princeton.edu]
I do think that java probably is preferable as a language for avoidi
Re:If CVS was implemented in Java... (Score:2)
Re:If CVS was implemented in Java... (Score:2)
I think a JIT compiler written in ocaml would be cool. I hear ocaml is an excellent language for writing compilers.
Re:If CVS was implemented in Java... (Score:3, Insightful)
it is just that the loading of the runtime engine, garbage collector, on-the-fly-compiling by the interpreter, etc produce a high overhead at startup. thus small, short programs seem to run slow, whereas in big applications the speed penalty is marginal!
Re:Is it the same flaw? (Score:5, Informative)
But just to make things clearer here are the links to the advisories:
Subversion [e-matters.de]
CVS [e-matters.de]
I also put up a more clear description of the Subversion problem up on subversion site. [tigris.org]
Re:Is it the same flaw? (Score:2)
Re:Unsurprising (Score:2)
Better yet, if a free software source control system were to provide the features he needs, which are not currently available in CVS or Subversion.
Linux development is very decentralized, so Bitkeeper is much better suited to it than CVS or Subversion. The CVS and Subversion models are by their nature oriented toward having a single central repository, thou
Re:Unsurprising (Score:4, Interesting)
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.
Re:Wait! (Score:2)
Hasn't anyone LOOKED at the code?
Have you ever considered the possibility that they may have discovered the vulnerability by looking at the code?
They still have to make sure everyone knows about it, you know.
Re:Wait! (Score:3, Interesting)
Just because you found a bunch of problems a while ago doesn't mean you shouldn't look at the code again later.
Re:distro updates? (Score:2)
portupgrade -R subversion
CVS is part of the base system -- it was fixed in all the security branches [freebsd.org] early this morning.
Re:distro updates? (Score:3, Insightful)
Re:Heap overflow? (Score:5, Informative)
Which one happens depends on the libc and the allocation pattern, but for any app on any particular system it may be predictable.
The one that is easiest to exploit is writing over another variable, like b. This gives the attack a way to write into a variable they weren't meant to access, which leads in short order to the computer being stretched wide open.
Re:Heap overflow? (Score:3, Informative)
Maybe you are thinking about stack based buffer overflows. Stack based buffer overflows are often easy to exploit, and I think more than 50% of the worms on the internet use such exploits. It just means that you can overflow a buffer, which is allocated on the stack. When such an overflow happens, the return address is usually just a few bytes away, so you can change the return address to point into the buffer you just filled with code.
A stack overflow OTOH rarely happ