Release of uutils 0.13, the Rust language version of GNU Coreutils. Vulnerability in uutils

The project uutils coreutils 0.13.0 (Rust Coreutils) has been released, developing an alternative to the GNU Coreutils package, written in Rust. The coreutils package includes over a hundred utilities, including sort, cat, chmod, chown, chroot, cp, date, dd, echo, hostname, id, ln, and ls. The goal of the project is to create a cross-platform alternative implementation of Coreutils, capable of running on Windows, Redox, and Fuchsia platforms, among others.

Rust Coreutils is used by default in the Ubuntu 26.10 release and partially in Ubuntu 26.04. Rust Coreutils is also applied in the AerynOS (Serpent OS) and Apertis distributions (developed by Collabora). Unlike GNU Coreutils, the Rust implementation is distributed under the permissive MIT license instead of the copyleft GPL license. Additionally, the same team of developers is working on Rust analogs of the util-linux, diffutils, findutils, procps, and acl utility sets, as well as the sed and login programs.

In the new version of Rust Coreutils:

  • The compatibility level with the GNU Coreutils test suite was 95.26% (up from 94.36%). A total of 684 tests were successfully executed, which is 31 more than in the previous version. 23 tests failed (up from 21), and 11 tests were skipped (down from 18). 26 new tests have been transferred from the GNU tests, 2 of which are currently failing. Some behavioral aspects of GNU Coreutils not covered by its own test suite were discovered during the compatibility check, which prompted 82 commits to GNU Coreutils, primarily related to adding new tests and minor fixes.
  • Certain discrepancies with GNU Coreutils in the behavior of the utilities sort, date, dd, ls, tail, printf, and seq have been resolved.
  • The parameters and messages in the utilities pr, numfmt, stty, stat, and od have been synchronized with GNU Coreutils.
  • Changes have been made for safer handling of symbolic links in the utilities cp, mv, ln, chown, chgrp, and install. For instance, in the cp utility, writing in recursive mode is disabled when a symbolic link points to the target directory. In mv and ln, replacing a directory with a symbolic link is prohibited.
  • Efforts have been made to eliminate crashes due to write failures in the utilities rmdir, chcon, cp, tail, numfmt, printf, and seq.
  • The byte deletion in the tr utility has been accelerated, and the encoding and decoding of base58 in the basenc utility has been optimized. Buffering has been disabled during line-by-line output in the od utility.
  • Utilities have been optimized: the 'basenc base58' command has been accelerated by 35 times, cut by 23%, date by 22%, and join by 20%.
  • The number of utilities supporting input in encodings other than UTF-8 has been expanded.
  • Preserved input data in encodings other than UTF-8 in the output of the date, stat, and shred utilities.
  • The chroot and sync utilities, as well as access right handlers, have been transitioned to use the std library instead of rustix. The cp and dd utilities have switched to the set_len function instead of ftruncate.
  • Tests for WASI builds (WebAssembly) have been added for seq, mv, fmt, readlink, dircolors, cksum, realpath, nproc, shred, and join.
  • For the Windows platform, the ln utility now converts "/" to "\" in symbolic links. The cp utility has been enhanced to support recursive copying of root directories like "W:/".
  • Capabilities have been expanded, issues fixed, or missing options added for the following utilities: b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, chroot, cksum, comm, cp, csplit, cut, date, dd, df, dircolors, dirname, du, env, expand, expr, factor, fmt, fold, groups, head, hostname, id, install, join, ln, ls, md5sum, mkdir, mkfifo, mknod, mktemp, more, mv, nice, nl, nohup, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, seq, shred, shuf, sort, split, stat, stdbuf, stty, sum, sync, tac, tail, tee, test, timeout, touch, tr, truncate, tsort, uname, unexpand, uniq, uptime, users, wc, who, whoami, yes.

Additionally, it is worth noting the disclosure of 4 vulnerabilities in uutils, which were discreetly resolved in version uutils 0.12. One of the vulnerabilities (CVE not assigned) has a critical severity level (9.9 out of 10) and allows for code substitution in the utility executables during build by creating a specially crafted ftl file with translations. The problem is present in the uucore package (core functions used in uutils) and arises from the fact that the build script build.rs embeds the content of ftl files into the source code before compilation using the "include!" macro without proper newline character validation.

If the text contains the character '»', the content is embedded as a raw string, which allows the substitution of custom code in the file embedded_locales.rs by specifying the characters '»#' in the ftl file. Raw strings in Rust are enclosed with 'r#»…»#', thus by substituting '»#', you can prematurely close the string and any subsequent text will be treated by the compiler as source code. Since reviewers primarily focus on code files, translation files may be overlooked, potentially allowing an injection vulnerability by joining the team responsible for translations. Example of a malicious ftl file: greeting = quote «#), «pwn» => { std::process::Command::new(«/bin/sh»).arg(«-c») .arg(«id > /tmp/UUTILS_FTL_INJECTION_PROOF»).status().ok(); None }, «tail» => Some(r#»

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster