CVE-2022-50481 (GCVE-0-2022-50481)
Vulnerability from cvelistv5 – Published: 2025-10-04 15:16 – Updated: 2025-10-04 15:16
VLAI?
Title
cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
Summary
In the Linux kernel, the following vulnerability has been resolved:
cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
If device_register() fails in cxl_register_afu|adapter(), the device
is not added, device_unregister() can not be called in the error path,
otherwise it will cause a null-ptr-deref because of removing not added
device.
As comment of device_register() says, it should use put_device() to give
up the reference in the error path. So split device_unregister() into
device_del() and put_device(), then goes to put dev when register fails.
Severity ?
No CVSS data available.
Assigner
References
Impacted products
| Vendor | Product | Version | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux |
Affected:
14baf4d9c739e6e69150512d2eb23c71fffcc192 , < 96fba6fb95bdede80583c262ac185da09661f264
(git)
Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < 1ae581696b7a799afa39a664c4b721569643f58a (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < d775a1da5a52b4f4bb02f2707ba420d1bec48dbb (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < 60b2ed21a65f3f5318666ccd765c3507991370cf (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8 (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < e5021bbf11b024cc65ea1e84c377df484183be4b (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < b32559ee4e6667c5c3daf4ec5454c277d1f255d2 (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < ab44c182353be101c3be9465e1d15d42130c53c4 (git) Affected: 14baf4d9c739e6e69150512d2eb23c71fffcc192 , < 61c80d1c3833e196256fb060382db94f24d3d9a7 (git) |
|||||||
|
|||||||||
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/misc/cxl/guest.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "96fba6fb95bdede80583c262ac185da09661f264",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "1ae581696b7a799afa39a664c4b721569643f58a",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "d775a1da5a52b4f4bb02f2707ba420d1bec48dbb",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "60b2ed21a65f3f5318666ccd765c3507991370cf",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "e5021bbf11b024cc65ea1e84c377df484183be4b",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "b32559ee4e6667c5c3daf4ec5454c277d1f255d2",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "ab44c182353be101c3be9465e1d15d42130c53c4",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
},
{
"lessThan": "61c80d1c3833e196256fb060382db94f24d3d9a7",
"status": "affected",
"version": "14baf4d9c739e6e69150512d2eb23c71fffcc192",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/misc/cxl/guest.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "4.6"
},
{
"lessThan": "4.6",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.9.*",
"status": "unaffected",
"version": "4.9.337",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.14.*",
"status": "unaffected",
"version": "4.14.303",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.19.*",
"status": "unaffected",
"version": "4.19.270",
"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": "4.9.337",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.14.303",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.19.270",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.4.229",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.10.163",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.15.86",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.0.16",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.2",
"versionStartIncluding": "4.6",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.2",
"versionStartIncluding": "4.6",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()\n\nIf device_register() fails in cxl_register_afu|adapter(), the device\nis not added, device_unregister() can not be called in the error path,\notherwise it will cause a null-ptr-deref because of removing not added\ndevice.\n\nAs comment of device_register() says, it should use put_device() to give\nup the reference in the error path. So split device_unregister() into\ndevice_del() and put_device(), then goes to put dev when register fails."
}
],
"providerMetadata": {
"dateUpdated": "2025-10-04T15:16:40.374Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/96fba6fb95bdede80583c262ac185da09661f264"
},
{
"url": "https://git.kernel.org/stable/c/1ae581696b7a799afa39a664c4b721569643f58a"
},
{
"url": "https://git.kernel.org/stable/c/d775a1da5a52b4f4bb02f2707ba420d1bec48dbb"
},
{
"url": "https://git.kernel.org/stable/c/60b2ed21a65f3f5318666ccd765c3507991370cf"
},
{
"url": "https://git.kernel.org/stable/c/170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8"
},
{
"url": "https://git.kernel.org/stable/c/e5021bbf11b024cc65ea1e84c377df484183be4b"
},
{
"url": "https://git.kernel.org/stable/c/b32559ee4e6667c5c3daf4ec5454c277d1f255d2"
},
{
"url": "https://git.kernel.org/stable/c/ab44c182353be101c3be9465e1d15d42130c53c4"
},
{
"url": "https://git.kernel.org/stable/c/61c80d1c3833e196256fb060382db94f24d3d9a7"
}
],
"title": "cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2022-50481",
"datePublished": "2025-10-04T15:16:40.374Z",
"dateReserved": "2025-10-04T15:13:33.468Z",
"dateUpdated": "2025-10-04T15:16:40.374Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
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…