VDB

CVE-2025-22017

CVE-2025-22017 PUBLISHED

devlink: fix xa_alloc_cyclic() error handling

Reported by linux · Published April 8, 2025

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-libbpfAmazon Linux6.12.22-27.96.amzn2023
kernel6.12-modules-extraAmazon Linux6.12.22-27.96.amzn2023
kernel-develAmazon Linux6.12.22-27.96.amzn2023
kernel-toolsAmazon Linux6.12.22-27.96.amzn2023

Affected products

VendorProductVersions
LinuxLinuxc137743bce02b18c1537d4681aa515f7b80bf0a8, c137743bce02b18c1537d4681aa515f7b80bf0a8, c137743bce02b18c1537d4681aa515f7b80bf0a8
LinuxLinux6.7, 0, 6.12.21
amazon:2023kernel-libbpf0
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel-devel0
amazon:2023kernel-tools0
linuxlinux_kernel6.7, 6.7, 6.7
LinuxLinux6.14, *, *
amazon:2023perf6.120
amazon:2023kernel6.120
amazon:2023python3-perf6.120
amazon:2023bpftool0
amazon:2023kernel-headers0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-tools-devel0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-livepatch-6.12.22-27.960
amazon:2023kernel-libbpf-static0

Timeline

  • Apr 7, 2025 CVE Published
  • Apr 8, 2025 EPSS Score (30 in total, the first dated here)
  • May 10, 2025 Coalition ESS Score (7 in total, the first dated here)
  • Dec 21, 2025 Security Advisory (107 in total, the first dated here)
  • Dec 21, 2025 CVE Updated
  • Apr 29, 2026 Distribution Patch (104 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-22017
vulnetix vdb fixes CVE-2025-22017

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-22017/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›