|
|
Log in / Subscribe / Register

The malicious "rustdecimal" crate

The malicious "rustdecimal" crate

Posted May 12, 2022 13:26 UTC (Thu) by sionescu (subscriber, #59410)
In reply to: The malicious "rustdecimal" crate by tchernobog
Parent article: The malicious "rustdecimal" crate

> Unfortunately, history shows that malicious code has landed and will continue to land also in mainstream distributions.

Do you have examples ?


to post comments

The malicious "rustdecimal" crate

Posted May 12, 2022 14:13 UTC (Thu) by tchernobog (subscriber, #73595) [Link] (3 responses)

Well, log4j has been packaged and distributed for quite a while despite allowing remote execution, has it not? Not to mention a long list of CVEs in packages more (e.g. openssl) or less critical.

Humans are imperfect, no human review process is 100% safe.

A survey conducted through GitHub claims that about one in five bugs are planted with malicious intent.

https://www.zdnet.com/article/open-source-software-how-ma...

Considering the thousands of CVEs that have been open against a distro like Debian over the years, there is a good and fair chance that several bugs we have seen (and many we haven't yet) were indeed intentionally planted.

The malicious "rustdecimal" crate

Posted May 13, 2022 11:03 UTC (Fri) by mkj (subscriber, #85885) [Link] (1 responses)

That zdnet article is off by a factor of 100. It has mistaken 0.2% for 20%.

The malicious "rustdecimal" crate

Posted May 13, 2022 11:43 UTC (Fri) by excors (subscriber, #95769) [Link]

I think they got the right numbers but the wrong context. The original report (https://octoverse.github.com/static/github-octoverse-2020...) says:

> Most software vulnerabilities are mistakes, not malicious attacks. Analysis on a random sample of 521 advisories from across our six ecosystems [Composer, Maven, npm, NuGet, PyPI, RubyGems] found that 17% of the advisories were related to explicitly malicious behavior such as backdoor attempts. These malicious vulnerabilities were generally in seldom-used packages, but triggered just 0.2% of alerts. While malicious attacks are more likely to get attention in security circles, most vulnerabilities are caused by mistakes.

and:

> Analysis on a random sample of 521 advisories from across our six ecosystems finds that 17% of the advisories are related to explicitly malicious behavior such as backdoor attempts. Of those 17%, the vast majority come from the npm ecosystem. While 17% of malicious attacks will steal the spotlight in security circles, vulnerabilities introduced by mistake can be just as disruptive and are much more likely to impact popular projects. Out of all the alerts GitHub sent developers notifying them of vulnerabilities in their dependencies, only 0.2% were related to explicitly malicious activity. That is, most vulnerabilities were simply those caused by mistakes.

To be honest, I can't actually understand what that's trying to say. But I don't believe it's saying that 17% (nor 0.2%) of vulnerabilities were maliciously inserted: it's about advisories not vulnerabilities (and most projects won't bother with advisories for regular boring vulnerabilities found through code review), and "advisories related to explicitly malicious behaviour/activity" sounds like it's talking about active exploitation of a possibly-accidental vulnerability (vs an unexploited vulnerability found through code review), probably? Without more detail on the methodology (which I haven't been able to find) the numbers seem largely meaningless.

The malicious "rustdecimal" crate

Posted May 13, 2022 13:15 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

> one in five bugs are planted with malicious intent

This doesn't pass my smell test. The article says "vulnerabilities" without defining what they mean. I presume they actually mean "CVEs on GitHub-hosted projects" here, but it's really hard to tell. There are plenty of vulnerabilities that never get a CVE. There are also plenty not on GitHub. So without some metric of what they're talking about, I have no idea how useful such a statistic is. But "bugs" is almost certainly not what you mean here (at least as I understand the term).

The malicious "rustdecimal" crate

Posted May 12, 2022 14:50 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (7 responses)

mjg59 provided a link recently: https://lists.debian.org/debian-devel/2003/02/msg00771.html

Upstream included code targeting Debian specifically. Maintainer did not spot this. (I don't blame him. I wouldn't spot it either. Life is too short to read diffs between versions).

The malicious "rustdecimal" crate

Posted May 12, 2022 16:49 UTC (Thu) by ballombe (subscriber, #9523) [Link] (6 responses)

This a nearly 20 year-old example, and it was done by the upstream maintainer.
If you have nothing better, that rather prove that Linux distributions are quite safe
against malicious code injection.

The malicious "rustdecimal" crate

Posted May 13, 2022 9:27 UTC (Fri) by wtarreau (subscriber, #51152) [Link] (5 responses)

> This a nearly 20 year-old example, and it was done by the upstream maintainer.

In fact it's the perfect counter-example: all that could be found dates 20 years because the distro model works very well!

The malicious "rustdecimal" crate

Posted May 13, 2022 13:50 UTC (Fri) by zdzichu (subscriber, #17118) [Link] (4 responses)

The question was for ANY example of malicious code going into the distro. The example was provided. Nitpicking about the date is just moving the goalposts.

The malicious "rustdecimal" crate

Posted May 15, 2022 3:46 UTC (Sun) by wtarreau (subscriber, #51152) [Link] (3 responses)

"nitpicking" :-)

Selecting an issue that happened more than 10 years before the ecosystem subject of this article was even imagined is hardly relevant to this discussion, I'm sorry. It's presenting a process that's supposed to be better than another one without looking at what was done since in order to make sure this issue doesn't happen anymore. Yet the current situation is presented as having that limitation while it may very well be what made this issue not happen anymore. That's precisely a swap of cause and consequence.

The malicious "rustdecimal" crate

Posted May 15, 2022 3:53 UTC (Sun) by mjg59 (subscriber, #23239) [Link] (2 responses)

> without looking at what was done since in order to make sure this issue doesn't happen anymore

Nothing was done. There's no process in Debian to prevent something like this happening again - the reason it hasn't is that upstreams are generally not malicious.

The malicious "rustdecimal" crate

Posted May 20, 2022 2:21 UTC (Fri) by dilinger (subscriber, #2867) [Link]

And there's the fact that such a malicious bug would only affect a certain subset of debian users (those running unstable) rather than stable users. An upstream could plant something debian-specific that waited several years before triggering so that it happened on debian stable systems, but that's quite the long game. Or stable could be targeted by a fast-changing package in stable, like firefox/chromium.

The malicious "rustdecimal" crate

Posted Jun 12, 2022 6:45 UTC (Sun) by marcH (subscriber, #57642) [Link]

> the reason it hasn't is that upstreams are generally not malicious.

"Generally" is good enough except for security or safety issues. My smartphone "generally" does not crash: good enough. My bank account is "generally" safe from hackers: not good enough.

But of course security bugs are also "just bugs". So it's funny to see some $BIGCORPS suddenly very obsessed about preventing security bugs and wondering "how did that happen?" when the answer is often just:
because crashing from time to time was considered good enough... until hackers look at our products.

The malicious "rustdecimal" crate

Posted May 13, 2022 20:24 UTC (Fri) by jwilk (subscriber, #63328) [Link]


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds