if ( document.comments_form.url ) { document.comments_form.url.value = getCookie("mtcmthome"); } Otaku, Cedric's weblog: August 2007 Archives

August 27, 2007

Opening your source doesn't make your software more secure

In an article comparing Windows to Red Hat, Microsoft recently used the following quote from former chair of the Apache security team Ben Laurie:

Although it’s still often used as an argument, it seems quite clear to me that the “many eyes” argument, when applied to security, is not true.
Ben responded by clarifying what he meant in this post and while it appears that the quote has indeed been taken out of context, the overall idea that open source automatically produces software that's more secure is a fallacy that's been empirically demonstrated by now.

Software becomes secure for a bunch of reasons:

  • It was designed from the ground up with security in mind.
  • It was implemented from the ground up with security in mind.
  • It was implemented by good developers.
  • These developers are security experts.
  • These developers reviewed each other's code before checking it in.
  • A lot of money was spent on testing and QA.
  • The software was extensively beta-tested.
Actually, I think that the main reason why a piece of software becomes secure is:
  • The software has been running for years and has received (and keeps receiving) numerous fixes and patches.
I'm not even putting "The software is open source" in this list, because to be honest, I'm not convinced that the open source factor wins against obscurity in terms of security. When a vulnerability is open source and that its subsequent fix is open sourced as well, you make it very easy for average hackers to take advantage of it right away. And I think the main problem is average hackers, not very good ones (who will access the source of the program anyway, whether it was open source or not).

I'm also a bit skeptical that code reviews catch that many fundamental programming (and security) mistakes. When a check-in exceeds even ten files, it's extremely hard to understand how the change will impact the rest of the huge code base that is already in place. It might be easy to spot obvious mistakes in languages like C or C++, where overrun buffers and other attacks can be identified within a few lines of code, but in other higher level languages, you really need to understand the big picture, and past a certain size, only automated size or excessive usage of this code will actually reveal these bugs.

The simple fact is that users that download open source software will probably never look at the source. Even I, as a developer, just don't bother any more. And if I can choose between downloading software in source or binary form, I will always pick the latter and trust that the company releasing it (or the Internet community) will have done the security audit for me.

The quote by Microsoft is certainly taken out of context to serve their purposes, but I think that a lot of security experts will agree with it.

Posted by cedric at 10:07 AM | Comments (11)

August 08, 2007

A fond farewell to Harry Potter

Note: this post contains absolutely no spoilers on any of the seven Harry Potter books.

I just turned the last page of "Harry Potter and the Deathly Hallows" and I have to say that this was probably one of the most enjoyable books I've read in years.

It's not a compliment I give lightly, and unfortunately, most of the books that I read are very easily forgettable, but the Harry Potter series has managed to keep my interest up ever since the first one came out.

I remember noticing a friend reading it shortly after it came out. I had never heard of Harry Potter before and a quick glance at the back cover prompted me to ask the question that tens of thousands of people have asked these past years about Harry Potter: "Isn't this a child's book?".

Not that there is anything wrong with reading child's books. As a matter of fact, just a few years ago, I made a point of reading up on some classical children stories (such as the Chronicles of Narnia) in order to catch up on this aspect of the American culture I didn't grow up with. My interest was therefore piqued about Harry Potter, and when my friend observed casually that "Yes, but there's something about the way this is written that makes it really gripping", I quickly bought the book and started a long journey in the depths of the wizarding world.

In hindsight, there are two points that I absolutely adored about the series, and particularly that last book:

  • It's a complex plot even though it's written from Harry's perspective pretty much all the time.

    I tend to like books with elaborate plots, twists and big arcs that form a complex story. These books usually unfold their plot by switching points of views, places, people and sometimes even points in time. These artefacts are necessary to set up the background for your readers and, to some extent, to confuse them a bit. It's a bit like prestidigitation and sleight of hand: you want to set up your readers so that you can surprise them with A when they expect B.

    This kind of magic trick is much harder to achieve when you're writing your story completely linearly and following your hero from page one until the end. Except for a few flashbacks, you don't have a lot of freedom to set up your twists and revelations, which must all occur through the eyes of your hero.

    I think J.K. Rowling's mastery in this art will be studied in literary schools for years to come.

  • It's pretty obvious that J.K. Rowling knew where she was going with her story from the first book on.

    This last book contains revelations and explanations that are absolutely startling and yet perfectly consistent with the previous books. Maintaining coherence and vision throughout seven books written over several years is no small feat, and while similar books and TV shows are frantically trying to keep up with their own contradictions and cheap cliffhangers to try and maintain the illusion of a vision (I'm looking at you, "Lost"), J.K. Rowling's reigns supreme in the art of building up an epic yet entertaining world (as opposed to... "The Lord of the Rings", which is complex but dull).

    Harry Potter is one of the most sophisticated and best written plot ever created, along with Babylon 5 and Perry Rhodan.

I have felt sad every single time I have turned the last page of a Harry Potter book, and this one is no exception, except that the melancholy is increased by the realization that it's now time to say goodbye to our spell casting friends for good.

Here's to hoping that J.K. Rowling's next creation won't take too long and that it will be as enthralling as the Harry Potter saga.

Posted by cedric at 09:02 AM | Comments (9)