CVE-2021-33910

Description

A flaw was found in systemd. The use of alloca function with an uncontrolled size in function unit_name_path_escape allows a local attacker, able to mount a filesystem on a very long path, to crash systemd and the whole system by allocating a very large space in the stack. The highest threat from this vulnerability is to the system availability.

Statement

This issue did not affect the versions of systemd as shipped with Red Hat Enterprise Linux 7 as they did not use strdupa to duplicate strings in unit_name_path_escape function, but strdup, which allocates space on the heap.

Further, any Red Hat product which is supported on the Red Hat Enterprise Linux platform is also potentially impacted. This includes:

  • Product containers which are based on the RHEL or UBI container images. These images are updated regularly, and container health indicating whether a fix to this flaw is available can be seen in the Container Health Index, part of the Red Hat Container Catalog (https://access.redhat.com/containers). In addition, any customer containers should be manually rebuilt when the base images are updated.
  • Products which pull packages from the RHEL channel. Please ensure that the underlying Red Hat Enterprise Linux systemd package is current in these product environments.

Mitigation

Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.55.5N/A
Attack VectorLocalLocalN/A
Attack ComplexityLowLowN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactNoneNoneN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Red Hat CVSS v3 Score Explanation

Attack Vector set to Local (AV:L) as the attack does not involve any network interaction. Privilege Required set to Low (PR:L) because an attacker needs to have at least some privileges on the system to mount a filesystem on a very long path. Availability set to High (A:H) considering that systemd and the whole system crashes.

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

If an attacker can trigger the allocation of the limited resources, but the number or size of the resources is not controlled, then the most common result is denial of service. This would prevent valid users from accessing the product, and it could potentially have an impact on the surrounding environment, i.e., the product may slow down, crash due to unhandled errors, or lock out legitimate users. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.

Access Control,Other

Technical Impact: Bypass Protection Mechanism; Other

In some cases it may be possible to force the product to "fail open" in the event of resource exhaustion. The state of the product -- and possibly the security functionality - may then be compromised.

Acknowledgements

Red Hat would like to thank Qualys Research Team for reporting this issue.

Frequently Asked Questions

Want to get errata notifications? Sign up here.