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.
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-42341.json"
"2026-04-11T18:45:36Z"
[
{
"signature_version": "v1",
"signature_type": "Line",
"source": "https://github.com/openrc/openrc/commit/bb8334104baf4d5a4a442a8647fb9204738f2204",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207679416206326861038642815747665608070",
"306811907150965935071199721586451901054",
"248606507048680140938313775952029393638",
"32882432418019817314654663469612702326"
]
},
"id": "CVE-2021-42341-4bd5508a",
"deprecated": false,
"target": {
"file": "src/rc/checkpath.c"
}
},
{
"signature_version": "v1",
"signature_type": "Line",
"source": "https://github.com/openrc/openrc/commit/63db2d99e730547339d1bdd28e8437999c380cae",
"digest": {
"threshold": 0.9,
"line_hashes": [
"45057512560065433203384835656393182996",
"203195856256754260875214493873999561561",
"180073597658392079713689905354966276894",
"61341373325503063106368747768837312032",
"8541824265712935841359065203911070283",
"5793846777462089443266027614163972899",
"16448722649974046682378375240976205483",
"15245629152732676392184877446644895749",
"260306301820211992372726519336481115318",
"131923064533998638388817993741821923757",
"178576601073051544819759240433395045013",
"260888722047746666487514733750536182357",
"268656059247349874073266928249638713721",
"134142116609933514116837226408076646027",
"143886639434633822553547662491661285241",
"274566218699362171606134349699654484465",
"61201551075889825972854987358443282760",
"70528938680108357449356890817907164175",
"236068047111414426674650716020170007704",
"7564714837949738247637194820652667243",
"231494718903656406396743929245647863203",
"20885336192955867217990311440218979211",
"118675555220676572100048326970366300759",
"135470900035884913073991822739382831887",
"102254948405254144808689212673586852396",
"305325335611317341936889035693236300237",
"253280716470911579951221887059716900460",
"127489358081139359432628350313215993195",
"45175478354120890939981633198658265447",
"182329471395905723311182326836356304383",
"199762465766809131589544349179197100198",
"224798346174053818807420658189791392487",
"218161424380041216086684924084290394398",
"250644211414518598850466377990168421647",
"239266466125563874929105533905485625636",
"274826657537095971866335891709620252868",
"111806724767392942611785665456033653503",
"168371052946930203792729322163429576679"
]
},
"id": "CVE-2021-42341-875384d4",
"deprecated": false,
"target": {
"file": "src/rc/checkpath.c"
}
},
{
"signature_version": "v1",
"signature_type": "Function",
"source": "https://github.com/openrc/openrc/commit/63db2d99e730547339d1bdd28e8437999c380cae",
"digest": {
"function_hash": "231158222591236663606464182066127475142",
"length": 1550.0
},
"id": "CVE-2021-42341-8c692ce4",
"deprecated": false,
"target": {
"file": "src/rc/checkpath.c",
"function": "main"
}
},
{
"signature_version": "v1",
"signature_type": "Function",
"source": "https://github.com/openrc/openrc/commit/bb8334104baf4d5a4a442a8647fb9204738f2204",
"digest": {
"function_hash": "92566106471082546406511347603524503662",
"length": 427.0
},
"id": "CVE-2021-42341-d062cbcd",
"deprecated": false,
"target": {
"file": "src/rc/checkpath.c",
"function": "clean_path"
}
},
{
"signature_version": "v1",
"signature_type": "Function",
"source": "https://github.com/openrc/openrc/commit/63db2d99e730547339d1bdd28e8437999c380cae",
"digest": {
"function_hash": "202064691133594493893387517198332028127",
"length": 1611.0
},
"id": "CVE-2021-42341-e80c09b5",
"deprecated": false,
"target": {
"file": "src/rc/checkpath.c",
"function": "get_dirfd"
}
}
]