Skip to content
Heist/ feed
Back to feed
UnratedFix available

cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() If device_register() fails in cxl_pci_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.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.303, 4.19.270, 4.9.337, 5.10.163, 5.15.86, 5.4.229, 6.0.16, 6.1.2
CVEs
CVE-2022-50244
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 03:14 UTC · Revision 1

Source evidence

cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

core-osv · Original source

Published 15 Sept 2025, 14:02 UTC

In the Linux kernel, the following vulnerability has been resolved: cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() If device_register() fails in cxl_pci_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.

osv:CVE-2022-50244

Kernel

Fixed versions: 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.86, 6.0.16, 6.1.2

Complete source record
{
  "id": "3a90aa77565f1d262064238d77aba13b165ce910c071235f059d32425d7b71db",
  "url": "https://osv.dev/vulnerability/CVE-2022-50244",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter() If device_register() fails in cxl_pci_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.",
    "evidence": "osv:CVE-2022-50244",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.9.337",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.14.303",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.270",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.229",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.163",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.86",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-50244",
      "aliases": [
        "CVE-2022-50244"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f204e0b8cedd7da1dfcfd05ed6b7692737e24029"
                },
                {
                  "fixed": "82e68432668ae75b4c814d160f6987ecb0681273"
                },
                {
                  "fixed": "82e5481428faf11c79b9c094dd24a1849bbf64ac"
                },
                {
                  "fixed": "c4b2e35df919d99bbbed033c2fa0b607f9f463b5"
                },
                {
                  "fixed": "361412dae1690d4b5df6f92fc943cdc773c95cbc"
                },
                {
                  "fixed": "0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec"
                },
                {
                  "fixed": "22511eefa61db26e12c97dd7ada3071dbdfcb004"
                },
                {
                  "fixed": "139abd4c626a6f7ce02789ed5f73aa2256e0542b"
                },
                {
                  "fixed": "2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339"
                },
                {
                  "fixed": "02cd3032b154fa02fdf90e7467abaeed889330b2"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50244.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.18.0"
                },
                {
                  "fixed": "4.9.337"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.10.0"
                },
                {
                  "fixed": "4.14.303"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.270"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.229"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.163"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.86"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.0.16"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.1.0"
                },
                {
                  "fixed": "6.1.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50244.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.377437590Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/02cd3032b154fa02fdf90e7467abaeed889330b2",
        "https://git.kernel.org/stable/c/0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec",
        "https://git.kernel.org/stable/c/139abd4c626a6f7ce02789ed5f73aa2256e0542b",
        "https://git.kernel.org/stable/c/22511eefa61db26e12c97dd7ada3071dbdfcb004",
        "https://git.kernel.org/stable/c/2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339",
        "https://git.kernel.org/stable/c/361412dae1690d4b5df6f92fc943cdc773c95cbc",
        "https://git.kernel.org/stable/c/82e5481428faf11c79b9c094dd24a1849bbf64ac",
        "https://git.kernel.org/stable/c/82e68432668ae75b4c814d160f6987ecb0681273",
        "https://git.kernel.org/stable/c/c4b2e35df919d99bbbed033c2fa0b607f9f463b5",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50244.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50244",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50244.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50244",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 509744,
  "published_at": "2025-09-15T14:02:01.364+00:00"
}