CVE Vulnerabilities

CVE-2022-24778

Incorrect Authorization

Published: Mar 25, 2022 | Modified: Nov 07, 2023
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
7.4 IMPORTANT
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Ubuntu
MEDIUM

The imgcrypt library provides API exensions for containerd to support encrypted container images and implements the ctd-decoder command line tool for use by containerd to decrypt encrypted container images. The imgcrypt function CheckAuthorization is supposed to check whether the current used is authorized to access an encrypted image and prevent the user from running an image that another user previously decrypted on the same system. In versions prior to 1.1.4, a failure occurs when an image with a ManifestList is used and the architecture of the local host is not the first one in the ManifestList. Only the first architecture in the list was tested, which may not have its layers available locally since it could not be run on the host architecture. Therefore, the verdict on unavailable layers was that the image could be run anticipating that image run failure would occur later due to the layers not being available. However, this verdict to allow the image to run enabled other architectures in the ManifestList to run an image without providing keys if that image had previously been decrypted. A patch has been applied to imgcrypt 1.1.4. Workarounds may include usage of different namespaces for each remote user.

Weakness

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.

Affected Software

Name Vendor Start Version End Version
Imgcrypt Linuxfoundation * 1.1.4 (excluding)
Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8 RedHat rhacm2/multicluster-operators-subscription-release-rhel8:v2.4.3-5 *
Red Hat Advanced Cluster Management for Kubernetes 2.5 for RHEL 8 RedHat rhacm2/multicluster-operators-channel-rhel8:v2.5.0-23 *
Red Hat Advanced Cluster Management for Kubernetes 2.5 for RHEL 8 RedHat rhacm2/multicluster-operators-subscription-rhel8:v2.5.0-63 *
Red Hat OpenShift Container Platform 4.11 RedHat openshift4/kubernetes-nmstate-rhel8-operator:v4.11.0-202208020235.p0.ga6744d1.assembly.stream *
RHACS-3.73-RHEL-8 RedHat advanced-cluster-security/rhacs-main-rhel8:3.73.0-4 *
Containerd Ubuntu bionic *
Containerd Ubuntu esm-apps/bionic *
Containerd Ubuntu esm-apps/xenial *
Containerd Ubuntu focal *
Containerd Ubuntu impish *
Containerd Ubuntu jammy *
Containerd Ubuntu trusty *
Containerd Ubuntu upstream *
Containerd Ubuntu xenial *

Extended Description

Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user’s privileges and any permissions or other access-control specifications that apply to the resource. When access control checks are incorrectly applied, users are able to access data or perform actions that they should not be allowed to perform. This can lead to a wide range of problems, including information exposures, denial of service, and arbitrary code execution.

Potential Mitigations

  • Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries.
  • Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
  • For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page.
  • One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.

References