CVE-2024-5138: snapd snapctl auth bypass
CVE-2024-5138 · GHSA-p9v8-q5m4-pf46
- Affected
- Go github.com/snapcore/snapd >= 2.51.6, < 2.63.1; < 0.0.0-20240524114846-68ee9c6aa916
- Fixed in
- 2.63.10.0.0-20240524114846-68ee9c6aa916· Vendor fix available
- Issue
- Impact A snap with prior permissions to create a mount entry on the host, such as firefox, normally uses the permission from one of the per-snap hook programs. A unprivileged users cannot normally trigger that behaviour by using snap run --shell firefox followed by snapctl mount, since snapd validates the requesting user identity (root or non-root). The issue allows unprivileged users to bypass that check by crafting a malicious command line vector which confuses snapd into thinking the help message is requested. Unprivileged user on a default installation of Ubuntu, where firefox is as provided as a snap, may cause a denial-of-service attack by repeatedly mounting hunspell database over and over and eventually exhausting system memory. Other attacks, reliant on the same underying mechanism (mount), are possible. In all cases the snap must be installed and grated permission to perform this action (by connecting an appropriate snap interface), which requires administrative privileges.…
Recommended action: Upgrade to 2.63.1 or 0.0.0-20240524114846-68ee9c6aa916 (pre-release) by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.