CVE-2021-42341

HIGH

OpenRC 0.44.0-0.44.7 - Memory Corruption via Incorrect String Length Calculation

Title source: llm
STIX 2.1

Description

checkpath in OpenRC before 0.44.7 uses the direct output of strlen() to allocate strings, which does not account for the '\0' byte at the end of the string. This results in memory corruption. CVE-2021-42341 was introduced in git commit 63db2d99e730547339d1bdd28e8437999c380cae, which was introduced as part of OpenRC 0.44.0 development.

References (6)

Core 6
Core References
Exploit, Patch, Third Party Advisory x_refsource_misc
https://github.com/OpenRC/openrc/issues/459
Patch, Third Party Advisory x_refsource_misc
https://github.com/OpenRC/openrc/pull/462
Exploit, Patch, Third Party Advisory x_refsource_misc
https://bugs.gentoo.org/816900
Exploit, Patch, Third Party Advisory x_refsource_misc
https://github.com/OpenRC/openrc/issues/418

Scores

CVSS v3 7.5
EPSS 0.0205
EPSS Percentile 78.7%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Details

Status published
Products (1)
openrc_project/openrc 0.44.0 - 0.44.7
Published Oct 14, 2021
Tracked Since Feb 18, 2026