Memory Corruption in OpenRC

openrc Updated 02 Oct 2025

Summary

14/10/2021
N/A
Yes i
High
7.5

CVE-2021-42341: 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. Affects openrc across 3 version ranges.

< 0.43.3-r2 < 63db2d99e730547339d1bdd28e8437999c380cae < bb8334104baf4d5a4a442a8647fb9204738f2204

Fixed in 0.43.3-r2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

OpenRC is an init system and service manager for Unix-like operating systems. It is responsible for starting and stopping services during the boot process and managing system resources. OpenRC is widely used in the Alpine Linux distribution.

Vulnerability Detail

The vulnerability, identified as CVE-2021-42341, exists in the checkpath function of OpenRC before version 0.44.7. The function uses the output of strlen() to allocate strings without accounting for the '\0' byte at the end of the string. This oversight leads to memory corruption, potentially resulting in system instability or unauthorized access. The vulnerability was introduced in commit 63db2d99e730547339d1bdd28e8437999c380cae during the development of OpenRC 0.44.0.

How To Fix

Minimum fixed version

0.43.3-r2

This is the first release that contains the fix.

sudo apk add --upgrade openrc

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

No workaround has been provided for this vulnerability.

Conclusion

The memory corruption vulnerability in OpenRC can have serious consequences for system stability and security. It is crucial to update to the fixed version (0.44.7 or later) to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for openrc →

Share this vulnerability

FAQ

OpenRC is an init system and service manager used in Unix-like operating systems, particularly Alpine Linux.

The vulnerability can lead to memory corruption, potentially causing system instability or unauthorized access.

You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground and it will alert you in real-time.

Yes, the fix for this vulnerability is available in OpenRC version 0.44.7 or later. It is recommended to update your system to the latest version.

You can find more information about this vulnerability in the CVE-2021-42341 JSON report at https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-42341.json.

Related vulnerabilities

Recent vulnerabilities recorded for openrc.

How To Fix

Minimum fixed version

0.43.3-r2

This is the first release that contains the fix.

sudo apk add --upgrade openrc

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback