CVE-2025-38182
kernel: ublk: santizize the arguments from userspace when adding a device
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 4, 2025
Updated · June 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
ublk: santizize the arguments from userspace when adding a device
Sanity check the values for queue depth and number of queues we get from userspace when adding a device.
Statement
A missing input validation in ublk_ctrl_add_dev() in the ublk driver allows an unprivileged userspace application (if UBLK_F_UNPRIVILEGED_DEV is enabled) or a privileged user (CAP_SYS_ADMIN) to supply invalid queue_depth or nr_hw_queues values. If unchecked, these values could exceed internal limits, possibly leading to a kernel crash. Triggering this vulnerability requires either root privileges or elevated capabilities (CAP_SYS_ADMIN) unless the system is explicitly configured to allow unprivileged ublk devices, which is rare.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 6.6CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
CWE-416 · Use After Free