3 ms·
RubyGems is not vulnerable to the xz/liblzma backdoor
- baggy_trough 3y agoHowever, we do need an easy way to see what's changed in the gems between "bundle update"s.
- kayodelycaon 3y agoHaving done this, it’s not worth the effort to implement if you using more than a handful of gems and a handful of gems is really easy to inspect using diff. And bundler isn’t aware of external C libraries you’d need to inspect. Auditing tools using a database of known vulnerabilities is the only scalable solution I know of.
- baggy_trough 3y agoTo get many eyeballs on gem diffs, we need an easy tool.
- freedomben 3y agoI think what GP is getting at, and is something I've hit as well in the past when auditing diffs, is that it's just not feasible. For a small project maybe, but for a medium to large Rails app for example you would need to dedicate potential multiple full time engineering to do nothing but review diffs. Things change fast, and a lot of the changes are not simple patchsets you can eyeball. Without some domain knowledge and even context such as "did they just refactor or is this a total rewrite" it can be very difficult to even understand what you're reading without a bunch of extra work. At a minimum you need to read the commit log in addition to the diffs. Personally, this is an area where I think AI could add a huge amount of value. An AI tool that looks at your gem versions (or node or elixir, whatever) and then reads all the commits that changed and reviews them for safety/security and maybe summarizes them, could be huge.
- kayodelycaon 3y agoI wouldn't even bother with deep analysis without access to the repo on Github or a similar site where I can see the PRs and their discussions.
- baggy_trough 3y agoFound https://my.diffend.io/gems https://my.diffend.io/gems which is basically this.
- macrolime 3y ago"As verified by running find / -name 'lzma' in our built containers, we depend only on version 5.4.3 and not on the vulnerable versions 5.6.0 or 5.6.1." Yet Debian is looking into reverting to 5.3.1, as all newer versions contain many commits by Jia Tan. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068024 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068024
- LegitShady 3y agothat sounds like a Debian problem, not a RubyGems problem, then.
- pilif 3y agono. We have to assume any commit of the threat actor to have been malicious. Given that 5.4 contains code by the threat actor, it's not safe to claim to not be vulnerable. Not vulnerable to this specific backdoor, sure. But I don't feel like 5.4 is safe either.
- nextaccountic 3y agoAre there any other distros that may do this? I see that debian did the funny 5.6.1+really5.4.5-1 thing but Arch for example is currently at 5.6.1-3. Don't Arch Linux also want to get rid of those suspicious commits?
- vvillena 3y agoArch has a policy to keep package patching to a minimum. If the newer xz version doesn't have a backdoor, they will probably follow upstream. Also, Arch doesn't appear to be affected by the vulnerability: >> openssh does not directly use liblzma. However debian and several other distributions patch openssh to support systemd notification, and libsystemd does depend on lzma. > Arch does not directly link openssh to liblzma, and thus this attack vector is not possible.
- nextaccountic 3y ago
- pilif 3y agoWhile this is great news, in my opinion, given the facts surrounding this backdoor, I think this article is misguided due to two reasons: 1. the scope of the known backdoor is very constrained to only be inserted into native OS packages. As such, I don't think we need every other user of liblzma to post blog posts that they are not vulnerable independently of which version they embed. This is at best noise and at worst dangerous because 2. the bad actor has been submitting patches to liblzma for much longer than the 5.6 release and given the ingenuity of the attack, it's too early to claim that a project is not vulnerable to backdoors simply because there might already have been other "presents" left by the threat actor. Given these two points, I really believe we should not be posting "hey we are not vulnerable" blog posts here because at best they are useless noise (nobody aside of debian or redhat and their downstreams is vulnerable) and at worst false assurances.
- putlake 3y agoCompletely disagree. Every project that has xz/liblzma added as a dependency should be looking at the source, compiling from said source and making sure their binaries that they shipped with their software match this. For example, homebrew should do this. If the attacker configured the backdoor for the server to enable a universal master key, who's to say they didn't engineer a backdoor for the Homebrew version to export private keys from the current user's .ssh folder?
- pilif 3y agoThat's my second point. Just checking for version <= 5.6.0 is not safe either and is exactly what the original article has done. But if all you use as the basis of the vulnerability analysis is the version constraint and what we currently know about the backdoor, then, unless you are a distro building a liblzma distro package, you will not be vulnerable no matter the version (which was my point 1)
- ncallaway 3y ago> it's too early to claim that a project is not vulnerable to backdoors I don’t think that’s a fair or accurate paraphrase of the blogpost. They said they weren’t exposed to the backdoor (headline), or this issue (body of article). Both are deliberately singular, and from context clearly referencing the known back door. I don’t see anything in the post claiming they aren’t vulnerable to back doors in general.
- deleted 3y ago[deleted]