CVE-2026-139166

devlink: region: fix snapshot id leak on kernel-allocated ids

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

devlink: region: fix snapshot id leak on kernel-allocated ids

When DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel
allocates one with __devlink_region_snapshot_id_get(). That helper counts
the caller as a user of the id, and the caller must release this hold
once it is done.

devlink_nl_region_new_doit() never drops it. The refcount of the id goes
1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot
is deleted the count only drops to 1, so the id is never erased from
the snapshot_ids xarray. The id then stays in use for the lifetime of
the devlink instance: requesting a snapshot with that explicit id fails
with -EEXIST, and there is no snapshot left to delete to clean it up.

Reproducer steps:
# devlink region new pci/0000:13:00.0/device-caps
pci/0000:13:00.0/device-caps: snapshot 0
# devlink region del pci/0000:13:00.0/device-caps snapshot 0
# devlink region new pci/0000:13:00.0/device-caps snapshot 0
kernel answers: File exists

Drop the caller's reference right after the snapshot has been created,
as the snapshot then holds its own.

Analysis

AI-generated

Technical impact

The Linux kernel had a reference‑counting flaw in the devlink region subsystem. When a region snapshot is created without an explicit id, the kernel allocates one and increments a reference that is never released. The id remains in the kernel's snapshot store, causing subsequent attempts to create a snapshot with the same id to fail with -EEXIST. Over time this leaks a snapshot identifier for the lifetime of the devlink instance, effectively exhausting the finite set of snapshot ids and resulting in a denial of service.

Affected Systems

All Linux kernel releases that include the devlink region functionality and have not applied the fix outlined in the source repository commits listed in the references. No specific kernel release numbers are provided, so any kernel in use that supports devlink with region snapshots is potentially affected until an updated kernel is deployed.

Risk and Exploitability

The exploit requires local privileged access to issue NETLINK commands against the devlink subsystem. It is not a remote attack vector. Because the flaw results in a functional but limited denial of service, the risk is moderate, dependent on the number of available snapshot ids. EPSS data is unavailable and the vulnerability is not listed in the CISA KEV catalog. The vulnerability can be exploited by repeatedly creating and deleting snapshots, eventually exhausting the id pool and causing legitimate snapshot operations to fail. Recovery requires a kernel reboot or removal of the existing devlink instance to reset the snapshot state.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the devlink snapshot id reference‑counting fix specified in the source commits.
  • Restart the system or reload the kernel module so the updated code takes effect.
  • Verify that no stale snapshot ids remain by ensuring that all devlink regions are recreated or that the snapshot id store has been cleared.

Generated by OpenCVE AI on November 30, 2026 at 20:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-401
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: devlink: region: fix snapshot id leak on kernel-allocated ids When DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel allocates one with __devlink_region_snapshot_id_get(). That helper counts the caller as a user of the id, and the caller must release this hold once it is done. devlink_nl_region_new_doit() never drops it. The refcount of the id goes 1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot is deleted the count only drops to 1, so the id is never erased from the snapshot_ids xarray. The id then stays in use for the lifetime of the devlink instance: requesting a snapshot with that explicit id fails with -EEXIST, and there is no snapshot left to delete to clean it up. Reproducer steps: # devlink region new pci/0000:13:00.0/device-caps pci/0000:13:00.0/device-caps: snapshot 0 # devlink region del pci/0000:13:00.0/device-caps snapshot 0 # devlink region new pci/0000:13:00.0/device-caps snapshot 0 kernel answers: File exists Drop the caller's reference right after the snapshot has been created, as the snapshot then holds its own.
Title devlink: region: fix snapshot id leak on kernel-allocated ids
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM