CVE-2023-53596
Description
A resource management issue was found in the Linux kernel's driver core regarding device-managed (devm) resource cleanup. When devices without buses or drivers are unregistered, their managed resources aren't properly freed because devres_release_all is only called for devices that have been probed. This causes resource leaks—particularly problematic when managed resources hold references to the device itself—preventing device objects from ever being freed and leading to denial of service through resource exhaustion.
Statement
The device-managed resource API (devm) allows drivers to tie resource allocations to device lifetimes. Historically, devres_release_all was called only during driver unbinding (in the driver probe failure or remove paths). This worked fine for traditional bus-based, driver-bound devices. However, some subsystems—particularly DRM/graphics—use device objects without traditional bus/driver bindings. For these devices, if a devm resource holds a reference to the device, you get a circular dependency: the device can't be released until resources are freed, but resources won't be freed until the device is released. This actually triggered a previous fix attempt (commit 2f8d16a996da) that was later reverted (commit a525a3ddeaca) due to double-free issues. The current fix calls devres_release_all in both device_del (during unregistration) and device_release (during final teardown), breaking the circular dependency while avoiding the earlier problems.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5.5 | 7.8 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | Low | Low | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | High | N/A |
| Integrity Impact | None | High | N/A |
| Availability Impact | High | High | N/A |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Resource Consumption (Other)
An attacker that can influence the allocation of resources that are not properly maintained could deplete the available resource pool and prevent all other processes from accessing the same type of resource.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.