Ubuntu 18.04 LTS / 20.04 LTS : snapd vulnerabilities (USN-5292-1)

high Nessus Plugin ID 158135

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 18.04 LTS / 20.04 LTS / 21.10 host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-5292-1 advisory.

- snapd 2.54.2 and earlier created ~/snap directories in user home directories without specifying owner-only permissions. This could allow a local attacker to read information that should have been private. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1 (CVE-2021-3155)

- snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1 (CVE-2021-4120)

- snapd 2.54.2 did not properly validate the location of the snap-confine binary. A local attacker who can hardlink this binary to another location to cause snap-confine to execute other arbitrary binaries and hence gain privilege escalation. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1 (CVE-2021-44730)

- A race condition existed in the snapd 2.54.2 snap-confine binary when preparing a private mount namespace for a snap. This could allow a local attacker to gain root privileges by bind-mounting their own contents inside the snap's private mount namespace and causing snap-confine to execute arbitrary code and hence gain privilege escalation. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1 (CVE-2021-44731)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-5292-1

Plugin Details

Severity: High

ID: 158135

File Name: ubuntu_USN-5292-1.nasl

Version: 1.9

Type: local

Agent: unix

Published: 2/17/2022

Updated: 10/16/2023

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Frictionless Assessment Azure, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: High

Score: 7.3

CVSS v2

Risk Factor: Medium

Base Score: 6.9

Temporal Score: 5.4

Vector: CVSS2#AV:L/AC:M/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2021-44731

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.9

Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2021-44730

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:18.04:-:lts, cpe:/o:canonical:ubuntu_linux:20.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:golang-github-snapcore-snapd-dev, p-cpe:/a:canonical:ubuntu_linux:golang-github-ubuntu-core-snappy-dev, p-cpe:/a:canonical:ubuntu_linux:snap-confine, p-cpe:/a:canonical:ubuntu_linux:snapd, p-cpe:/a:canonical:ubuntu_linux:snapd-xdg-open, p-cpe:/a:canonical:ubuntu_linux:ubuntu-core-launcher, p-cpe:/a:canonical:ubuntu_linux:ubuntu-core-snapd-units, p-cpe:/a:canonical:ubuntu_linux:ubuntu-snappy, p-cpe:/a:canonical:ubuntu_linux:ubuntu-snappy-cli

Required KB Items: Host/cpu, Host/Ubuntu, Host/Ubuntu/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2/17/2022

Vulnerability Publication Date: 2/17/2022

Reference Information

CVE: CVE-2021-3155, CVE-2021-4120, CVE-2021-44730, CVE-2021-44731

USN: 5292-1