{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-50481","id":"CVE-2022-50481","title":"cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()","description":"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 shou","descriptionLong":"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.","published":"2025-10-04T15:16:40.374Z","updated":"2026-11-07T02:30:56.969208209Z","reserved":"2025-10-04T15:13:33.468Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"96fba6fb95bdede80583c262ac185da09661f264","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"1ae581696b7a799afa39a664c4b721569643f58a","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"d775a1da5a52b4f4bb02f2707ba420d1bec48dbb","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"60b2ed21a65f3f5318666ccd765c3507991370cf","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"e5021bbf11b024cc65ea1e84c377df484183be4b","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"b32559ee4e6667c5c3daf4ec5454c277d1f255d2","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"ab44c182353be101c3be9465e1d15d42130c53c4","status":"affected","versionType":"git"},{"version":"14baf4d9c739e6e69150512d2eb23c71fffcc192","lessThan":"61c80d1c3833e196256fb060382db94f24d3d9a7","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.6","status":"affected"},{"version":"0","lessThan":"4.6","status":"unaffected","versionType":"semver"},{"version":"4.9.337","lessThanOrEqual":"4.9.*","status":"unaffected","versionType":"semver"},{"version":"4.14.303","lessThanOrEqual":"4.14.*","status":"unaffected","versionType":"semver"},{"version":"4.19.270","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.229","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.163","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.86","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.0.16","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1.2","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-476"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/96fba6fb95bdede80583c262ac185da09661f264","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/1ae581696b7a799afa39a664c4b721569643f58a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d775a1da5a52b4f4bb02f2707ba420d1bec48dbb","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/60b2ed21a65f3f5318666ccd765c3507991370cf","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e5021bbf11b024cc65ea1e84c377df484183be4b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/b32559ee4e6667c5c3daf4ec5454c277d1f255d2","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/ab44c182353be101c3be9465e1d15d42130c53c4","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/61c80d1c3833e196256fb060382db94f24d3d9a7","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50481.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50481","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00163,"epssPercentile":0.05566,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-50481","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50481","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-50481","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-50481","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}