APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Opera fixes backticks script - Duh!


© November 2005 Anthony Lawrence

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?

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.


Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Opera fixes backticks script - Duh!


Inexpensive and informative Apple related e-books:

Digital Sharing Crash Course

Take Control of IOS 11

Take Control of Pages

Take Control of Preview

Take Control of High Sierra




More Articles by © Anthony Lawrence




Printer Friendly Version

Have you tried Searching this site?

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.

Contact us


Printer Friendly Version





All this modern technology just makes people try to do everything at once. (Bill Watterson)




Linux posts

Troubleshooting posts


This post tagged:

Security



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode