CVE-2022-3328: Github.com/snapcore/snapd Snapd Race Condition Vulnerability Vulnerability
CRITICALCVE-2022-3328 is a CRITICAL (CVSS 7.8) snapd race condition vulnerability vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Github.com/snapcore/snapd libraries in the Go ecosystem. The issue involves snapd race condition vulnerability. Remediation is available by upgrading affected packages to version 2.57.6.
CVE-2022-3328 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2022-3328
To remediate this vulnerability, upgrade all affected Github.com/snapcore/snapd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/snapcore/snapd to 2.57.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/snapcore/snapd
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-3328, inspect your project dependencies for Github.com/snapcore/snapd:
inspect dependencies for github.com/snapcore/snapd
Analyze the terminal output to locate any version of Github.com/snapcore/snapd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.57.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Github.com/snapcore/snapd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-3328 Affected Github.com/snapcore/snapd Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/snapcore/snapd
|
Go |
< 2.57.6
|
2.57.6
|
References
Frequently Asked Questions
What is CVE-2022-3328?
Which Github.com/snapcore/snapd versions are affected?
What version fixes CVE-2022-3328?
Is github.com/snapcore/snapd affected?
What is the CVSS score of CVE-2022-3328?
What CWE is associated with CVE-2022-3328?
How can I check Go dependencies for CVE-2022-3328?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cjqf-877p-7m3f",
"modified" : "2024-11-18T16:26:34Z",
"published" : "2024-01-08T18:30:29Z",
"aliases" : [ "CVE-2022-3328" ],
"summary" : "snapd Race Condition vulnerability",
"details" : "Race condition in snap-confine's `must_mkdir_and_open_with_perms()`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/snapcore/snapd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.57.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-3328"
}, {
"type" : "WEB",
"url" : "https://github.com/snapcore/snapd/pull/12380"
}, {
"type" : "WEB",
"url" : "https://github.com/snapcore/snapd/commit/21ebc51f00b8a1417888faa2e83a372fd29d0f5e"
}, {
"type" : "WEB",
"url" : "https://github.com/snapcore/snapd/commit/6226cdc57052f4b7057d92f2e549aa169e35cd2d"
}, {
"type" : "WEB",
"url" : "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-3328"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/snapcore/snapd"
}, {
"type" : "WEB",
"url" : "https://ubuntu.com/security/notices/USN-5753-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-12T21:19:39Z",
"nvd_published_at" : "2024-01-08T18:15:45Z"
}
}