CVE-2025-22017: devlink: fix xa_alloc_cyclic() error handling

Published Apr 8, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

devlink: fix xaalloccyclic() error handling

In case of returning 1 from xaalloccyclic() (wrapping) ERRPTR(1) will be returned, which will cause ISERR() 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.

Affected Software

15 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=6.7<6.12.21
Linux Linux kernel>=6.13<6.13.9
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
Linux Linux kernel=6.14-rc4
Linux Linux kernel=6.14-rc5
Linux Linux kernel=6.14-rc6
Linux Linux kernel=6.14-rc7
debian/linux<6.12.21-1
6.12.21-1
debian/linux<6.12.21-1
6.12.21-1
linux/kernel>=6.7.0<6.12.21
6.12.21
linux/kernel>=6.13.0<6.13.9
6.13.9
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.21-1
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.21
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.13.9
  4. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.15-1
  5. Compensating control

    In devlink error handling, check whether the xa_alloc_cyclic() return value is lower than zero before treating it as an error, because a return value of 1 (wrapping) can produce ERR_PTR(1), for which IS_ERR() is false.

Event History

Apr 8, 2025
CVE Published
via MITRE·08:18 AM
Data Sourced
via MITRE·08:18 AM
Description
Data Sourced
via OSV·08:18 AM
DescriptionAffected Software
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·09:15 AM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2025-22017?

CVE-2025-22017 is considered a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-22017?

To fix CVE-2025-22017, update your Linux kernel to the latest patched version.

3

What types of systems are affected by CVE-2025-22017?

CVE-2025-22017 affects systems running the Linux kernel that utilize the devlink feature.

4

What are the potential consequences of CVE-2025-22017?

CVE-2025-22017 could lead to dereferencing uninitialized memory, causing unpredictability in application behavior.

5

Is there a workaround for CVE-2025-22017?

There are currently no known workarounds for CVE-2025-22017 besides applying the kernel update.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203