Snapd Local Privilege Escalation Vulnerability (CVE-2022-3328)

Snapd Local Privilege Escalation Vulnerability (CVE-2022-3328)

dezembro 3, 2022 | Jie Ji

Overview

On December 2, NSFOCUS CERT detected that Qualys released a local privilege escalation vulnerability (CVE-2022-3328) in Snapd. There is a conditional race vulnerability in the must_mkdir_and_open_with_perms() function in snap-confine, an attacker with normal user privileges can use Multipath Privilege Escalation Vulnerability (CVE-2022-41974) and Multipath Symbolic Link Vulnerability, bind the /tmp directory to any directory in the file system, and promote the ordinary user permissions to ROOT permissions. The CVSS score is 7.8. The details of this vulnerability have been made public. Relevant users are requested to take protective measures as soon as possible.

Snap is an application package suitable for desktops, clouds, and the IoT. It is widely used in Linux systems and is installed by default on Ubuntu systems.

Reference link:

https://www.qualys.com/2022/11/30/cve-2022-3328/advisory-snap.txt

Scope of Impact

Affected version

  • 2.54.3 <= snapd < 2.57.6

Ubuntu:

  • 2.54.3+ubuntu <= snapd < 2.57.5+ubuntu

Unaffected version

  • snapd >= 2.57.6

Ubuntu:

  • snapd >= 2.57.5+ubuntu

Vulnerability Detection

Ubuntu system users can check whether the current system is affected by checking the version. The command to check the version information of snapd is as follows:

snap version

Or:

dpkg -l snapd

If the current version is in the affected range, there may be a security risk.

Mitigation

At present, the official security version has been released to fix this vulnerability. It is recommended that affected users upgrade the package version in time:

https://github.com/snapcore/snapd/releases/tag/2.57.6

Ubuntu system users can use the following command to upgrade snapd:

sudo apt –only-upgrade install snapd

Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

About NSFOCUS

NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.

NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA).

A wholly owned subsidiary of NSFOCUS Technologies Group Co., Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.