CVE-2022-50724 (GCVE-0-2022-50724)
Vulnerability from cvelistv5 – Published: 2025-12-24 12:22 – Updated: 2025-12-24 12:22
VLAI?
Title
regulator: core: fix resource leak in regulator_register()
Summary
In the Linux kernel, the following vulnerability has been resolved:
regulator: core: fix resource leak in regulator_register()
I got some resource leak reports while doing fault injection test:
OF: ERROR: memory leak, expected refcount 1 instead of 100,
of_node_get()/of_node_put() unbalanced - destroy cset entry:
attach overlay node /i2c/pmic@64/regulators/buck1
unreferenced object 0xffff88810deea000 (size 512):
comm "490-i2c-rt5190a", pid 253, jiffies 4294859840 (age 5061.046s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ff ff ff ff ff ff a0 1e 00 a1 ff ff ff ff ................
backtrace:
[<00000000d78541e2>] kmalloc_trace+0x21/0x110
[<00000000b343d153>] device_private_init+0x32/0xd0
[<00000000be1f0c70>] device_add+0xb2d/0x1030
[<00000000e3e6344d>] regulator_register+0xaf2/0x12a0
[<00000000e2f5e754>] devm_regulator_register+0x57/0xb0
[<000000008b898197>] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]
unreferenced object 0xffff88810b617b80 (size 32):
comm "490-i2c-rt5190a", pid 253, jiffies 4294859904 (age 5060.983s)
hex dump (first 32 bytes):
72 65 67 75 6c 61 74 6f 72 2e 32 38 36 38 2d 53 regulator.2868-S
55 50 50 4c 59 00 ff ff 29 00 00 00 2b 00 00 00 UPPLY...)...+...
backtrace:
[<000000009da9280d>] __kmalloc_node_track_caller+0x44/0x1b0
[<0000000025c6a4e5>] kstrdup+0x3a/0x70
[<00000000790efb69>] create_regulator+0xc0/0x4e0
[<0000000005ed203a>] regulator_resolve_supply+0x2d4/0x440
[<0000000045796214>] regulator_register+0x10b3/0x12a0
[<00000000e2f5e754>] devm_regulator_register+0x57/0xb0
[<000000008b898197>] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]
After calling regulator_resolve_supply(), the 'rdev->supply' is set
by set_supply(), after this set, in the error path, the resources
need be released, so call regulator_put() to avoid the leaks.
Severity ?
No CVSS data available.
Assigner
References
Impacted products
| Vendor | Product | Version | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux |
Affected:
0120ec32a7774b5061ced1a9a7ff833edd8b4cb6 , < 35593d60b1622834984c43add7646d4069671aa9
(git)
Affected: aea6cb99703e17019e025aa71643b4d3e0a24413 , < 6a03c31d08f95dca9633a552de167b9e625833a8 (git) Affected: aea6cb99703e17019e025aa71643b4d3e0a24413 , < c4c64d8abd656b9807b63178750fa91454602b86 (git) Affected: aea6cb99703e17019e025aa71643b4d3e0a24413 , < 90b713aadc1240bf2dd03d610d6c1d016a9123a2 (git) Affected: aea6cb99703e17019e025aa71643b4d3e0a24413 , < f86b2f216636790d5922458578825e4628fb570f (git) Affected: aea6cb99703e17019e025aa71643b4d3e0a24413 , < ba62319a42c50e6254e98b3f316464fac8e77968 (git) Affected: 1d58235c062309d51660fd04182d7a8ab6a48ad6 (git) Affected: 167c3b1f9793a1fb23e75e693f078420850306d4 (git) Affected: 3fc99e38fdbf6b693693f861aa55a50a74c2d202 (git) Affected: 96c6b5d5775637b3095ef934f871044811fd4db7 (git) Affected: f58ce31b05b4ca0c200a5cbe4724efe279405095 (git) |
|||||||
|
|||||||||
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/regulator/core.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "35593d60b1622834984c43add7646d4069671aa9",
"status": "affected",
"version": "0120ec32a7774b5061ced1a9a7ff833edd8b4cb6",
"versionType": "git"
},
{
"lessThan": "6a03c31d08f95dca9633a552de167b9e625833a8",
"status": "affected",
"version": "aea6cb99703e17019e025aa71643b4d3e0a24413",
"versionType": "git"
},
{
"lessThan": "c4c64d8abd656b9807b63178750fa91454602b86",
"status": "affected",
"version": "aea6cb99703e17019e025aa71643b4d3e0a24413",
"versionType": "git"
},
{
"lessThan": "90b713aadc1240bf2dd03d610d6c1d016a9123a2",
"status": "affected",
"version": "aea6cb99703e17019e025aa71643b4d3e0a24413",
"versionType": "git"
},
{
"lessThan": "f86b2f216636790d5922458578825e4628fb570f",
"status": "affected",
"version": "aea6cb99703e17019e025aa71643b4d3e0a24413",
"versionType": "git"
},
{
"lessThan": "ba62319a42c50e6254e98b3f316464fac8e77968",
"status": "affected",
"version": "aea6cb99703e17019e025aa71643b4d3e0a24413",
"versionType": "git"
},
{
"status": "affected",
"version": "1d58235c062309d51660fd04182d7a8ab6a48ad6",
"versionType": "git"
},
{
"status": "affected",
"version": "167c3b1f9793a1fb23e75e693f078420850306d4",
"versionType": "git"
},
{
"status": "affected",
"version": "3fc99e38fdbf6b693693f861aa55a50a74c2d202",
"versionType": "git"
},
{
"status": "affected",
"version": "96c6b5d5775637b3095ef934f871044811fd4db7",
"versionType": "git"
},
{
"status": "affected",
"version": "f58ce31b05b4ca0c200a5cbe4724efe279405095",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/regulator/core.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "5.10"
},
{
"lessThan": "5.10",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.4.*",
"status": "unaffected",
"version": "5.4.229",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.10.*",
"status": "unaffected",
"version": "5.10.163",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"version": "5.15.86",
"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": "5.4.229",
"versionStartIncluding": "5.4.73",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.10.163",
"versionStartIncluding": "5.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.15.86",
"versionStartIncluding": "5.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.0.16",
"versionStartIncluding": "5.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.2",
"versionStartIncluding": "5.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.2",
"versionStartIncluding": "5.10",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.9.241",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.14.203",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.19.153",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.8.17",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.9.2",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nregulator: core: fix resource leak in regulator_register()\n\nI got some resource leak reports while doing fault injection test:\n\n OF: ERROR: memory leak, expected refcount 1 instead of 100,\n of_node_get()/of_node_put() unbalanced - destroy cset entry:\n attach overlay node /i2c/pmic@64/regulators/buck1\n\nunreferenced object 0xffff88810deea000 (size 512):\n comm \"490-i2c-rt5190a\", pid 253, jiffies 4294859840 (age 5061.046s)\n hex dump (first 32 bytes):\n 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........\n ff ff ff ff ff ff ff ff a0 1e 00 a1 ff ff ff ff ................\n backtrace:\n [\u003c00000000d78541e2\u003e] kmalloc_trace+0x21/0x110\n [\u003c00000000b343d153\u003e] device_private_init+0x32/0xd0\n [\u003c00000000be1f0c70\u003e] device_add+0xb2d/0x1030\n [\u003c00000000e3e6344d\u003e] regulator_register+0xaf2/0x12a0\n [\u003c00000000e2f5e754\u003e] devm_regulator_register+0x57/0xb0\n [\u003c000000008b898197\u003e] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]\n\nunreferenced object 0xffff88810b617b80 (size 32):\n comm \"490-i2c-rt5190a\", pid 253, jiffies 4294859904 (age 5060.983s)\n hex dump (first 32 bytes):\n 72 65 67 75 6c 61 74 6f 72 2e 32 38 36 38 2d 53 regulator.2868-S\n 55 50 50 4c 59 00 ff ff 29 00 00 00 2b 00 00 00 UPPLY...)...+...\n backtrace:\n [\u003c000000009da9280d\u003e] __kmalloc_node_track_caller+0x44/0x1b0\n [\u003c0000000025c6a4e5\u003e] kstrdup+0x3a/0x70\n [\u003c00000000790efb69\u003e] create_regulator+0xc0/0x4e0\n [\u003c0000000005ed203a\u003e] regulator_resolve_supply+0x2d4/0x440\n [\u003c0000000045796214\u003e] regulator_register+0x10b3/0x12a0\n [\u003c00000000e2f5e754\u003e] devm_regulator_register+0x57/0xb0\n [\u003c000000008b898197\u003e] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]\n\nAfter calling regulator_resolve_supply(), the \u0027rdev-\u003esupply\u0027 is set\nby set_supply(), after this set, in the error path, the resources\nneed be released, so call regulator_put() to avoid the leaks."
}
],
"providerMetadata": {
"dateUpdated": "2025-12-24T12:22:46.251Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/35593d60b1622834984c43add7646d4069671aa9"
},
{
"url": "https://git.kernel.org/stable/c/6a03c31d08f95dca9633a552de167b9e625833a8"
},
{
"url": "https://git.kernel.org/stable/c/c4c64d8abd656b9807b63178750fa91454602b86"
},
{
"url": "https://git.kernel.org/stable/c/90b713aadc1240bf2dd03d610d6c1d016a9123a2"
},
{
"url": "https://git.kernel.org/stable/c/f86b2f216636790d5922458578825e4628fb570f"
},
{
"url": "https://git.kernel.org/stable/c/ba62319a42c50e6254e98b3f316464fac8e77968"
}
],
"title": "regulator: core: fix resource leak in regulator_register()",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2022-50724",
"datePublished": "2025-12-24T12:22:46.251Z",
"dateReserved": "2025-12-24T12:20:40.330Z",
"dateUpdated": "2025-12-24T12:22:46.251Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": "{\"cve\":{\"id\":\"CVE-2022-50724\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-24T13:15:59.057\",\"lastModified\":\"2025-12-24T13:15:59.057\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nregulator: core: fix resource leak in regulator_register()\\n\\nI got some resource leak reports while doing fault injection test:\\n\\n OF: ERROR: memory leak, expected refcount 1 instead of 100,\\n of_node_get()/of_node_put() unbalanced - destroy cset entry:\\n attach overlay node /i2c/pmic@64/regulators/buck1\\n\\nunreferenced object 0xffff88810deea000 (size 512):\\n comm \\\"490-i2c-rt5190a\\\", pid 253, jiffies 4294859840 (age 5061.046s)\\n hex dump (first 32 bytes):\\n 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........\\n ff ff ff ff ff ff ff ff a0 1e 00 a1 ff ff ff ff ................\\n backtrace:\\n [\u003c00000000d78541e2\u003e] kmalloc_trace+0x21/0x110\\n [\u003c00000000b343d153\u003e] device_private_init+0x32/0xd0\\n [\u003c00000000be1f0c70\u003e] device_add+0xb2d/0x1030\\n [\u003c00000000e3e6344d\u003e] regulator_register+0xaf2/0x12a0\\n [\u003c00000000e2f5e754\u003e] devm_regulator_register+0x57/0xb0\\n [\u003c000000008b898197\u003e] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]\\n\\nunreferenced object 0xffff88810b617b80 (size 32):\\n comm \\\"490-i2c-rt5190a\\\", pid 253, jiffies 4294859904 (age 5060.983s)\\n hex dump (first 32 bytes):\\n 72 65 67 75 6c 61 74 6f 72 2e 32 38 36 38 2d 53 regulator.2868-S\\n 55 50 50 4c 59 00 ff ff 29 00 00 00 2b 00 00 00 UPPLY...)...+...\\n backtrace:\\n [\u003c000000009da9280d\u003e] __kmalloc_node_track_caller+0x44/0x1b0\\n [\u003c0000000025c6a4e5\u003e] kstrdup+0x3a/0x70\\n [\u003c00000000790efb69\u003e] create_regulator+0xc0/0x4e0\\n [\u003c0000000005ed203a\u003e] regulator_resolve_supply+0x2d4/0x440\\n [\u003c0000000045796214\u003e] regulator_register+0x10b3/0x12a0\\n [\u003c00000000e2f5e754\u003e] devm_regulator_register+0x57/0xb0\\n [\u003c000000008b898197\u003e] rt5190a_probe+0x52a/0x861 [rt5190a_regulator]\\n\\nAfter calling regulator_resolve_supply(), the \u0027rdev-\u003esupply\u0027 is set\\nby set_supply(), after this set, in the error path, the resources\\nneed be released, so call regulator_put() to avoid the leaks.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/35593d60b1622834984c43add7646d4069671aa9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6a03c31d08f95dca9633a552de167b9e625833a8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/90b713aadc1240bf2dd03d610d6c1d016a9123a2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ba62319a42c50e6254e98b3f316464fac8e77968\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c4c64d8abd656b9807b63178750fa91454602b86\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f86b2f216636790d5922458578825e4628fb570f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…