CVE-2022-50616 (GCVE-0-2022-50616)
Vulnerability from cvelistv5
Published
2025-12-08 01:16
Modified
2025-12-23 13:30
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
regulator: core: Use different devices for resource allocation and DT lookup
Following by the below discussion, there's the potential UAF issue
between regulator and mfd.
https://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/
From the analysis of Yingliang
CPU A |CPU B
mt6370_probe() |
devm_mfd_add_devices() |
|mt6370_regulator_probe()
| regulator_register()
| //allocate init_data and add it to devres
| regulator_of_get_init_data()
i2c_unregister_device() |
device_del() |
devres_release_all() |
// init_data is freed |
release_nodes() |
| // using init_data causes UAF
| regulator_register()
It's common to use mfd core to create child device for the regulator.
In order to do the DT lookup for init data, the child that registered
the regulator would pass its parent as the parameter. And this causes
init data resource allocated to its parent, not itself. The issue happen
when parent device is going to release and regulator core is still doing
some operation of init data constraint for the regulator of child device.
To fix it, this patch expand 'regulator_register' API to use the
different devices for init data allocation and DT lookup.
References
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/platform/x86/intel/int3472/clk_and_regulator.c",
"drivers/regulator/core.c",
"drivers/regulator/devres.c",
"drivers/regulator/of_regulator.c",
"drivers/regulator/stm32-vrefbuf.c",
"include/linux/regulator/driver.h"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "cb29811d989bcb7ea81ca111c4b13878b344e086",
"status": "affected",
"version": "a0c7b164ad115ec0556dc0904ee2218cbc5cedfa",
"versionType": "git"
},
{
"lessThan": "b0f25ca1ff9be7abd1679ae7e59a8f25dbffe67a",
"status": "affected",
"version": "a0c7b164ad115ec0556dc0904ee2218cbc5cedfa",
"versionType": "git"
},
{
"lessThan": "8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98",
"status": "affected",
"version": "a0c7b164ad115ec0556dc0904ee2218cbc5cedfa",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/platform/x86/intel/int3472/clk_and_regulator.c",
"drivers/regulator/core.c",
"drivers/regulator/devres.c",
"drivers/regulator/of_regulator.c",
"drivers/regulator/stm32-vrefbuf.c",
"include/linux/regulator/driver.h"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "3.18"
},
{
"lessThan": "3.18",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.0.*",
"status": "unaffected",
"version": "6.0.16",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.2",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.2",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.0.16",
"versionStartIncluding": "3.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.2",
"versionStartIncluding": "3.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.2",
"versionStartIncluding": "3.18",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nregulator: core: Use different devices for resource allocation and DT lookup\n\nFollowing by the below discussion, there\u0027s the potential UAF issue\nbetween regulator and mfd.\nhttps://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/\n\nFrom the analysis of Yingliang\n\nCPU A\t\t\t\t|CPU B\nmt6370_probe()\t\t\t|\n devm_mfd_add_devices()\t|\n\t\t\t\t|mt6370_regulator_probe()\n\t\t\t\t| regulator_register()\n\t\t\t\t| //allocate init_data and add it to devres\n\t\t\t\t| regulator_of_get_init_data()\ni2c_unregister_device()\t\t|\n device_del()\t\t\t|\n devres_release_all()\t|\n // init_data is freed\t|\n release_nodes()\t\t|\n\t\t\t\t| // using init_data causes UAF\n\t\t\t\t| regulator_register()\n\nIt\u0027s common to use mfd core to create child device for the regulator.\nIn order to do the DT lookup for init data, the child that registered\nthe regulator would pass its parent as the parameter. And this causes\ninit data resource allocated to its parent, not itself. The issue happen\nwhen parent device is going to release and regulator core is still doing\nsome operation of init data constraint for the regulator of child device.\n\nTo fix it, this patch expand \u0027regulator_register\u0027 API to use the\ndifferent devices for init data allocation and DT lookup."
}
],
"providerMetadata": {
"dateUpdated": "2025-12-23T13:30:18.720Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/cb29811d989bcb7ea81ca111c4b13878b344e086"
},
{
"url": "https://git.kernel.org/stable/c/b0f25ca1ff9be7abd1679ae7e59a8f25dbffe67a"
},
{
"url": "https://git.kernel.org/stable/c/8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98"
}
],
"title": "regulator: core: Use different devices for resource allocation and DT lookup",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2022-50616",
"datePublished": "2025-12-08T01:16:29.407Z",
"dateReserved": "2025-12-08T01:14:55.189Z",
"dateUpdated": "2025-12-23T13:30:18.720Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": "{\"cve\":{\"id\":\"CVE-2022-50616\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-08T02:15:47.330\",\"lastModified\":\"2025-12-08T18:26:19.900\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nregulator: core: Use different devices for resource allocation and DT lookup\\n\\nFollowing by the below discussion, there\u0027s the potential UAF issue\\nbetween regulator and mfd.\\nhttps://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/\\n\\nFrom the analysis of Yingliang\\n\\nCPU A\\t\\t\\t\\t|CPU B\\nmt6370_probe()\\t\\t\\t|\\n devm_mfd_add_devices()\\t|\\n\\t\\t\\t\\t|mt6370_regulator_probe()\\n\\t\\t\\t\\t| regulator_register()\\n\\t\\t\\t\\t| //allocate init_data and add it to devres\\n\\t\\t\\t\\t| regulator_of_get_init_data()\\ni2c_unregister_device()\\t\\t|\\n device_del()\\t\\t\\t|\\n devres_release_all()\\t|\\n // init_data is freed\\t|\\n release_nodes()\\t\\t|\\n\\t\\t\\t\\t| // using init_data causes UAF\\n\\t\\t\\t\\t| regulator_register()\\n\\nIt\u0027s common to use mfd core to create child device for the regulator.\\nIn order to do the DT lookup for init data, the child that registered\\nthe regulator would pass its parent as the parameter. And this causes\\ninit data resource allocated to its parent, not itself. The issue happen\\nwhen parent device is going to release and regulator core is still doing\\nsome operation of init data constraint for the regulator of child device.\\n\\nTo fix it, this patch expand \u0027regulator_register\u0027 API to use the\\ndifferent devices for init data allocation and DT lookup.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b0f25ca1ff9be7abd1679ae7e59a8f25dbffe67a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cb29811d989bcb7ea81ca111c4b13878b344e086\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…