LinuxWorld 2005 highlights

August 16th, 2005
  • Josh and Alex pulled me away from the Debian booth. I thought they were going to ask me to man the Mozilla booth, but it turned out they just wanted to introduce me to two Gentoo guys, who wanted to compliment me on Pornzilla.
  • I noticed that the Firefox bug Josh was playing with on his laptop was a security hole, and helped him file it as such.
  • I helped put up Firefox posters in a corner window of the convention building. Sadly, I wasn't there on Wednesday, when the posters were taken down.

Now using wp-cache

August 15th, 2005

DreamHost sent me automated notices that I was using over 100 CPU minutes a day on slaw.dreamhost.com, a web server with over 300 accounts. In other words, I was using at least 1/60 the capacity of the quad-core server. I guessed that a lot of my CPU usage was from the 10,000 hits a day for The Burning Edge's feed, so I installed wp-cache for The Burning Edge. The plugin doesn't seem to break anything; I think it invalidates its entire cache when anything changes (except for templates).

Installing the plugin for The Burning Edge reduced my CPU usage to about 55 minutes a day, low enough to stop the automated notices but still not within the desired range of 30-40 minutes a day. I just installed it for this blog too.

DreamHost promotion code

August 15th, 2005

DreamHost's "777" promotion ended in July 2005, but DreamHost is now allowing me to share my referral bonus with you. If you enter the promotion code squarefree when signing up for any one-year or two-year plan, you'll get $77 off (and I'll get $20 for referring you). To use the promotion code, enter squarefree into the promotion code box on step 5 while signing up. (This is the step after you enter your personal information but before you enter your credit card number.)

If you use this code to sign up for a monthly plan, you'll only get $50 off, which will cover the setup fee that monthly plans have. Since DreamHost has a generous 97-day money back guarantee period, I recommend using a yearly plan instead.

Related: Why I love DreamHost and Snapshots (cool backup feature) on DreamHost.

Greasemonkey 0.4 pre-beta

July 17th, 2005

Aaron Boodman posted Greasemonkey 0.4, attempt III today on the Greasemonkey mailing list. It is the first version of Greasemonkey that works in Deer Park alpha 2 and Firefox trunk builds. Earlier messages describe attempt I and new features, attempt 2, and the call for pre-beta testing.

Security holes in Google Desktop Search fixed

July 17th, 2005

Google recently fixed several holes in Google Desktop Search that I found. This is the email I sent to security@google.com to report the holes:

This combination of security holes in mulitple products allows an attacker to read text files indexed and cached by Google Desktop Search. Its success rate is proportional to the amount of time the attacker can keep the victim on the attacker's site and the victim's CPU speed. I think all parts of this attack would work against both Firefox and Internet Explorer, but I've only tested part 1 and only in Firefox.

Recover the URL for the home page of Google Desktop Search

The URL for the front page of Google Desktop Search is http://127.0.0.1:4664/&s=nnnnnnnnnn for some 10-digit string nnnnnnnnnn. If the string is incorrect, GDS returns a page that says "Invalid Request". This seems to be a second line of defense against XSS and CSRF attacks.

Most browsers have information leaks that allow web scripts to determine whether a link is visited. The attacker assumes that the user has visited the GDS start page with the correct value for nnnnnnnnnn recently enough that the URL is in the browser's global history. Based on my experiments and calculations, it would take several days of CPU time for a script in an untrusted web page in Firefox to find out which of the 10^10 links of the form http://127.0.0.1:4664/&s=nnnnnnnnnn is visited. An attacker might try to keep a victim on a page for several days, or might try to keep a large number of users on his site for a shorter peroid of time. I don't know what algorithm generates the value nnnnnnnnnn, so I don't know if it has weaknesses that might allow the attacker's script to test fewer than 10^10 URLs.

Solutions: GDS could use a longer salt, to make iterating through every possible salt value harder. GDS could restrict salts to single use, but I think this would break too many things. Firefox (and other browsers) could plug the information leaks in global history.

References:

Perform a Princeton DNS attack

First, make gds.evil.com resolve to an IP under the control of the attacker, with a short TTL. Make the victim load http://gds.evil.com:4664/, which contains a script. Then make gds.evil.com resolve to 127.0.0.1. The script then creates an iframe that loads http://gds.evil.com:4664/&s=nnnnnnnnnnn and uses cross-frame scripting to control the page served by GDS.

You can check that GDS does not prevent this part of the attack by loading GDS and then replacing 127.0.0.1 in the URL with warez.squarefree.com (which resolves to 127.0.0.1).

Solutions: GDS could reject requests where the hostname is not "127.0.0.1" or "localhost" (IMO, the HTTP protocol requires it to do so). Firefox, Windows XP, the Windows XP firewall, or my ISP could prevent "external" DNS names from resolving to "internal" IP addresses.like 127.0.0.1.

References:

Combining the holes

Once the attacker has script access to http://gds.evil.com:4664/, has gds.evil.com resolving to 127.0.0.1, and knows the hash for the home page, he can search for text files and view cached text files. (The links to cached text files are absolute and have 127.0.0.1 as the hostname, but they continue to work when 127.0.0.1 is replaced by warez.squarefree.com, which resolves to 127.0.0.1.)

I sent this email on Feb 13, 2005. The first part was fixed in version 20050227 by making the salt longer. The second part was fixed in version 20050325 by making GDS reject requests with hostnames other than "127.0.0.1" and "localhost". Google started pushing the updated version to existing users on June 2, 2005, so most users should be upgraded by now. You can see what version of GDS you have by clicking "About".

This is not the same as the hole found by Rice students (Slashdot article), which had been fixed previously.

Mac bugs

July 17th, 2005

The Mozilla Foundation is letting me use a Mac laptop during my internship. Firefox (trunk) seems buggier on Mac than on Windows, although to be fair, I am used to Firefox's bugs under Windows. I spent a lot of last week filing, testcasing, and voting for bugs as I ran into them. One Mac-specific bug I ran into is a potential security hole in addition to being annoying.

In Mountain View again

July 16th, 2005

I'm in Mountain View for another summer of working on Mozilla, this time as an intern at the Mozilla Foundation. Thanks to Ishani for helping me move into my new apartment.

Don’t sound stupid, stop saying like.

June 3rd, 2005

These posters were posted around UCSD this week. I don't know who designed and posted them.

No likes

I, like, love you

Is it, like, because I, like, say 'like', like, so much?