Skip to content
Heist/ feed
Back to feed
UnratedFix available

devlink: fix xa_alloc_cyclic() error handling

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: devlink: fix xa_alloc_cyclic() error handling In case of returning 1 from xa_alloc_cyclic() (wrapping) ERR_PTR(1) will be returned, which will cause IS_ERR() to be false. Which can lead to dereference not allocated pointer (rel). Fix it by checking if err is lower than zero. This wasn't found in real usecase, only noticed. Credit to Pierre.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.21, 6.13.9
CVEs
CVE-2025-22017
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 20:30 UTC · Revision 1

Source evidence

devlink: fix xa_alloc_cyclic() error handling

core-osv · Original source

Published 8 Apr 2025, 08:18 UTC

In the Linux kernel, the following vulnerability has been resolved: devlink: fix xa_alloc_cyclic() error handling In case of returning 1 from xa_alloc_cyclic() (wrapping) ERR_PTR(1) will be returned, which will cause IS_ERR() to be false. Which can lead to dereference not allocated pointer (rel). Fix it by checking if err is lower than zero. This wasn't found in real usecase, only noticed. Credit to Pierre.

osv:CVE-2025-22017

Kernel

Fixed versions: 6.12.21, 6.13.9

Complete source record
{
  "id": "f8b106e4c30840ee6576cee4d12a3c018bc20ef919e046bc16d7c31aa28dbfc2",
  "url": "https://osv.dev/vulnerability/CVE-2025-22017",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "devlink: fix xa_alloc_cyclic() error handling",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: devlink: fix xa_alloc_cyclic() error handling In case of returning 1 from xa_alloc_cyclic() (wrapping) ERR_PTR(1) will be returned, which will cause IS_ERR() to be false. Which can lead to dereference not allocated pointer (rel). Fix it by checking if err is lower than zero. This wasn't found in real usecase, only noticed. Credit to Pierre.",
    "evidence": "osv:CVE-2025-22017",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.21",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-22017",
      "aliases": [
        "CVE-2025-22017"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c137743bce02b18c1537d4681aa515f7b80bf0a8"
                },
                {
                  "fixed": "f8aaa38cfaf6f20afa4db36b6529032fb69165dc"
                },
                {
                  "fixed": "466132f6d28a7e47a82501fe1c46b8f90487412e"
                },
                {
                  "fixed": "f3b97b7d4bf316c3991e5634c9f4847c2df35478"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22017.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.21"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22017.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:23.622556505Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/466132f6d28a7e47a82501fe1c46b8f90487412e",
        "https://git.kernel.org/stable/c/f3b97b7d4bf316c3991e5634c9f4847c2df35478",
        "https://git.kernel.org/stable/c/f8aaa38cfaf6f20afa4db36b6529032fb69165dc",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22017.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-22017",
        "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/2025/22xxx/CVE-2025-22017.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-22017",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 489867,
  "published_at": "2025-04-08T08:18:06.575+00:00"
}