Opera fixes backticks script - Duh!

I think my jaw actually dropped when I read the details of this security alert: Opera *nixed by security bug

First of all, it's exactly the same problem that was reported for Firefox two months ago. Don't these guys read security alerts even in their own arena?


Hate these ads?

But even more annoying is that this shouldn't have happened to either of them: the "bug" was misusing or allowing backticks to be passed through to the shell. That's just stupid, and is rookie programmer stuff: if you need to use backticks yourself, you have to rigorously sanitize anything you might put between them (a good general rule is simply "don't do that, period"), and if you are passing ANYTHING to a shell, you need to examine what you are passing and strip out backticks always.

There's no excuse for not doing that. People have been warning new programmers about backticks for years; do a Google search for "shell security backticks" and you'll see what I mean. This is basic level stuff, and it is beyond incredible that it bit these guys. I would like to charitably assume that this was just an error of sloppiness; because it was "just a shell script" programmers who darn well do know better just didn't look very closely. But it's still disturbing, isn't it?

Maybe this points up a problem in current security reporting: the lack of a shame factor. If your app gets bit because of an obscure timing bug in the kernel, you certainly have my sympathy and I don't feel like somebody should be slapping you up the side of your head. But this kind of dumb mistake? Sheesh, the people responsible ought to be sent to the corner with a dunce hat for a few minutes.

Security advisories just report the facts without editorial comment other than perhaps a severity rating. Maybe they should also start having a "Duh!" rating: a buffer overflow exploit would be a "Duh!" of 10, not filtering backticks would get you the same, while an obscure bit misinterpretation in a tcp header might only be a 2 score. This one might be a 20 because of the same thing biting Firefox before them. Maybe the threat of an embarassing "Duh!" rating would cause more careful code review.

Oh well. We all make mistakes. I have been yanked out of a sound sleep by a dream in which I think I've done something really stupid in a cgi script, and at least once that was true (fortunately my error was never exploited). Opera is a great browser in spite of this lapse. Hopefully these slip ups will cause all programmers to look more closely at their own code and we won't have more of this kind of nonsense. I do think a "Duh!" rating might help encourage that.


Technorati tags:

Comments /Security/backticks.html


Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner

cartoon
Need eyes on the ground at your customer's site?
Installation and light training Boston and New England
Reliable and experienced, punctual and professional.

Views for this page
Today This Week This Month This Year  Overall
1629344 2,271

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Security




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.









Change Congress


Related Posts