CVE-2021-27851 Local privilege escalation in GNU Guix via guix-daemon and '--keep-failed'
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- UbuntuDebian
Description
A security vulnerability that can lead to local privilege escalation has been found in ’guix-daemon’. It affects multi-user setups in which ’guix-daemon’ runs locally. The attack consists in having an unprivileged user spawn a build process, for instance with guix build, that makes its build directory world-writable. The user then creates a hardlink to a root-owned file such as /etc/shadow in that build directory. If the user passed the --keep-failed option and the build eventually fails, the daemon changes ownership of the whole build tree, including the hardlink, to the user. At that point, the user has write access to the target file. Versions after and including v0.11.0-3298-g2608e40988, and versions prior to v1.2.0-75109-g94f0312546 are vulnerable.
Upgrade path
5 packages: 2 fixed, 1 partially fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/guix(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/guix(Ubuntu Pro 22.04) | = 1.2.0-4; = 1.3.0-2; = 1.3.0-4; = 1.3.0-4ubuntu0.1~esm1 +1 more | No fix listed | No fix yet |
| GNU Guix guix-daemon | < v1.2.0-75109-g94f0312546; >= v0.11.0-3298-g2608e40988 | v1.2.0-75109-g94f0312546 | Partially fixed |
| debian/guix(Debian 11) | < 1.2.0-4 | 1.2.0-4 | Fixed |
| GNU guix | >= 0.11.0, < 1.2.0 | 1.2.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/guix(Ubuntu:22.04) | All versions | No fix listed |
| GNU guix | >= 0.11.0, < 1.2.0 | 1.2.0 |
| GNU Guix guix-daemon | >= v0.11.0-3298-g2608e40988 | No fix listed |
| GNU Guix guix-daemon | < v1.2.0-75109-g94f0312546 | v1.2.0-75109-g94f0312546 |
| ubuntu/guix(Ubuntu:Pro:22.04) | All versions | No fix listed |
| ubuntu/guix(Ubuntu:Pro:22.04) | = 1.2.0-4 | No fix listed |
| ubuntu/guix(Ubuntu:Pro:22.04) | = 1.3.0-2 | No fix listed |
| ubuntu/guix(Ubuntu:Pro:22.04) | = 1.3.0-4 | No fix listed |
| ubuntu/guix(Ubuntu:Pro:22.04) | = 1.3.0-4ubuntu0.1~esm1 | No fix listed |
| debian/guix(Debian:11) | < 1.2.0-4 | 1.2.0-4 |
References
- security-tracker.debian.org vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.gnu.org issue-tracking mailing-list patch vendor-advisory
- guix.gnu.org issue-tracking patch vendor-advisory
- issues.guix.gnu.org issue-tracking
- git.savannah.gnu.org issue-tracking