Fri, 03 Apr 2009

Fading Memories

Beware...

Of people issuing "security" patches. Last week a couple of Linux distributions were suckered into updating lcms with a patch coming from a certain Andrea Barsiani. Because of an alleged security risk... Well, this patch completely and utterly broke lcms. And right at the time when we were tagging KOffice RC1, so people who run up-to-date distros started reporting crashes in Krita. We nearly got a heart attack thinking it was our code...

To quote Marti Maria, the lcms maintainer:

The short history is, a guy called Adrea Barisani, claiming to represent some obscure security company called oCERT, was providing a patch to fix a "vulnerability" they found.

At the end, the oCERT company was just Andrea Barsiani who setup ocert in 2008 to get google sponsoring.

The whole internet is now filled with hype about this "vulnerability", and in truth this "patch" breaks littlecms functionality, and probably opens some back door, so, please:

DON'T USE PATCHES FROM UNTRUSTED SOURCES.

I guess you were told something similar in school right? :-)

The problem, if any, is restricted to a very specific architecture (x86, no DEP, crafted profile).

With this patch lcms does not work at all. Please upgrade to 1.18 and let's forgot all this nasty stuff.

So, if you're packaging lcms for your distro, please upgrade to 1.18. And, please, if you patch lcms, make sure it's an official patch, from a trusted source. Like, Marti Maria...

Update: Kubuntu has a fix, and Marc Deslauriers has identified the possible culprit from the security patch. This patch was also in on 1.18b1, but removed in 1.18b2.

/software | permanent link | 26 comments |



Re: Beware...

Francesco wrote on Fri, 03 Apr 2009 14:05

I do know the Andrea in subject, he's involved from many years in open source, devolving time and efforts for it. May be the patch has been made in a hurry and with errors, but for how you put it here it seem it has been done volountary to put a backdoor. Every one does errors, what sense make put names in a so strong manner, would be fine if someone do the same with you the next time you introduce a bug?

Reply



Re: Beware...

Diego E. 'Flameeyes' Pettenò wrote on Fri, 03 Apr 2009 14:48

Okay, so let's start calling names to everybody who ever committed something to any open source project that could have caused an issue?

There is no backdoor nor malice, shit happens. The fact that one patch from Andrea was moot does not mean that the rest of his patches (and whether you and lcms upstream know that or not, there have been many in the past four years at least) is.

Really not a good thing to spread FUD around people, especially those working hard for the good of the community.

Reply



Re: Beware...

joe wrote on Fri, 03 Apr 2009 16:06

The part of the patch that broke Krita was included upstream in 1.18beta1. It's not an "untrusted" patch that broke Krita, it was a patch the upstream had accepted into official source.

Reply



Re: Beware...

Tim wrote on Fri, 03 Apr 2009 18:35

No, oCERT isn't just Andrea, please check http://www.ocert.org/team_and_members.html. The oCERT team provide valuable support when dealing with the free/open source community regarding vulnerabilities that are indepently discovered, even with large projects such as KDE.

Reply



Re: Beware...

marti wrote on Fri, 03 Apr 2009 21:56

Please read my message. I didn't release any patch. I only realeased version 1.18 which works and has the bug solved. Beta1 and 2 were internal release candidates. I didn't release any of those. My complain was about a person not related with lcms releasing a patch that breaks functionality after I specifically warned him that the patch was ill-beheaved. I have been those 10 years very strict on qualifying releases, just to avoid things like that. And frankly, detailing how this bug can be used to write a virus doesn't help very much to security stuff: http://scarybeastsecurity.blogspot.com/2009/03/littlecms-exploit.html But please, let's forgot this story completely, we had lcms1.18 with all this solved, and this is the only

Reply



Re: Beware...

Marti wrote on Fri, 03 Apr 2009 20:37

beta1 was the result of applying this patch (among other things) I just created beta2 when detected the patch was faulty. The patch was NOT from upstream, just the contrary.

Reply



Re: Beware...

Joshua Jackson wrote on Fri, 03 Apr 2009 21:12

I'm sure this won't actually be posted...however:

I actually looked at the patch and I'm no c or c++ programmer, just able to read code well enough to get the jist of things.

The patch was not malicious in nature. Marti, seems to be placing the blame on others in this case instead of accepting responsibility. Ultimately its the upstream who accepted the patch, applied it, and released it.

Was the patch possibly a source of a problem, sure. Could it of been tested better before submitting sure, but it could and should of been reviewed like all other patches should be before being included in any release. If it indeed, was tested at all...

I'm disappointed in both Marti and you Rempt. If you looked at the code, you'd see that the patch in question didn't add any huge backdoors.

By blindly posting this, you do a disservice to not only your organization, but also to everyone who is involved with this.

Reply



Re: Beware...

Boudewijn wrote on Fri, 03 Apr 2009 22:51

Sorry for the interruption. Apparently my comment system has a problem with some characters in the comments. I had to hack the comments file to fix that.

At the same time I did, intentionally, and I will do it again, remove a few comments I found offensive. These are my bytes, on my harddisk, and I'll do with them what I want.

Reply



Re: Beware...

Andrea Barisani wrote on Sun, 05 Apr 2009 01:03

The patch didn't come from me, the patch came from Chris Evans and was evaluated by Marti for improving the security of lcms.

oCERT, which is not a company but an open source project committed to helping other open source projects (see http://ocert.org for the facts) acts as a clearinghouse and mediator in making sure the patches are promptly reviewed and accepted by maintainers and pushed to vendors in a timely fashion.

Vendors were told to patch lcms with the available beta version (authored by Marti) but they decided to use Chris Evan's patch which had a minor issue (and we warned vendors beforehand that the patch was not 100% tested and that beta version was to be favoured). Marti was unable to provide an incremental security patch and some vendors felt that switching to the new version was too much of a big deal evidently and they went against our advice. Such is life. Patch intention was to protect lcms from a real security issue (we have PoC that executes arbitrary code), the patch broke it, vendor used it, we are sorry that happened.

But oCERT is not an "obscure company" and the security risk in lcms was real and proved by a PoC. We don't provide "backdoors" and anyone compentent enough to read the patch knows that it provides some integer checking and fixes lcms issues rather than opening a security risk.

"At the end, the oCERT company was just Andrea Barsiani who setup ocert in 2008 to get google sponsoring."

This is plain FUD, Marti. Check your facts before accusing projects that are just trying to help you (and which you thanked for our coordination effort, quite a change of mind now).

I think this thread comments itself, there isn't too much to add.

It's sad to see these kind of reactions.

The people who know better and know the good work of oCERT I am sure will ignore all of this.

Cheers

Reply



Re: Beware...

Andrea Barisani wrote on Sun, 05 Apr 2009 19:18

"Regarding my comments about oCERT origins, see here my sources: http://www.esecurityplanet.com/trends/article.php/3746186/Centralized-Security-Reporting-for-Open-Source.htm"

I didn't setup oCERT in order to get Google sponsorship, I setup oCERT to accomplish its mission and vision, that resulted in getting (non monetary Goggle sponsorship).

I understand that you might have not intended that but your words sounded like an accusation about me doing oCERT "just" for getting some sponsorship from Google. Which you can understand it would be a bad interpretation.

If that wasn't the intention of your comment I apoligize, but that's how it looked like to me.

"Crashes=possible backdoors", that's very inaccurate. A backdoor is something intentionally placed by a coder in order to get access, it's not something "incidental". In the security circle a "backdoor" is a pretty defined concept, please use that word carefully".

Your comment implied that the patch deliberately placed a backdoor in the code, accusing Chris (or me) of doing so maliciously. You can see how that would be a problem right and that is clearly not the case?

Cheers

Reply



Re: Beware...

Marti wrote on Sun, 05 Apr 2009 19:53

Andreas, please see the reply message I sent to the lcms-usr mailing list, after the one Boudewijn is reproducing:

http://sourceforge.net/mailarchive/message.php?msg_name=20090404133935.2cginonekg8gcw4w%40212.87.196.4

On my first mail I was really disapointed. I was receiving reports of crashes from different sources, not all on the OSS side.

One of those sources sent me the offending patch and I discovered in dismay this was the first patch from Chris, so I assumed you were sending that patch. If this is not the case, I apologize.

It is true the way I used was probably too strong, but I still think the message of "don't blindly apply patches" applies"

Reply


Your Comment


Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comment:
Save my Name and URL/Email for next time
Captcha: To prevent comment spam, please retype the characters in this image:

Enter the text here: