CVE-2021-33910
systemd: uncontrolled allocation on the stack in function unit_name_path_escape leads to crash
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 20, 2021
Updated · November 21, 2025
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.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
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.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-400 · Uncontrolled Resource Consumption