CVE-2025-21856: s390/ism: add release function for struct device
In the Linux kernel, the following vulnerability has been resolved:
s390/ism: add release function for struct device
According to devicerelease() in /drivers/base/core.c, a device without a release function is a broken device and must be fixed.
The current code directly frees the device after calling deviceadd() without waiting for other kernel parts to release their references. Thus, a reference could still be held to a struct device, e.g., by sysfs, leading to potential use-after-free issues if a proper release function is not set.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Add a proper release function for the s390/ism struct device before or when registering it with device_add(), so the device is not freed while references may still be held.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21856?
CVE-2025-21856 is considered to have a medium severity level due to its potential impact on device management in the Linux kernel.
How do I fix CVE-2025-21856?
To fix CVE-2025-21856, update your Linux kernel to the latest stable version that has the release function implemented for struct device.
What systems are affected by CVE-2025-21856?
CVE-2025-21856 affects devices running the Linux kernel, particularly those relying on the s390 architecture.
What happens if I don't address CVE-2025-21856?
Failing to address CVE-2025-21856 may lead to unstable device management which can cause system crashes or unexpected behaviors.
Is there a workaround for CVE-2025-21856?
There are no known workarounds for CVE-2025-21856; updating the Linux kernel is the recommended course of action.