CVE-2025-21807: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: block: fix queue freeze vs limits lock order in sysfs store methods queue_attr_store() always freezes a device queue before calling the attribute store operation. For attributes that control queue limits, the store operation will also lock the queue limits with a call to queue_limits_start_update(). However, some drivers (e.g. SCSI sd) may need to issue commands to a device to obtain limit values from the hardware with the queue limits locked. This creates a potential ABBA deadlock situation if a user attempts to modify a limit (thus freezing the device queue) while the device driver starts a revalidation of the device queue limits. Avoid such deadlock by not freezing the queue before calling the ->store_limit() method in struct queue_sysfs_entry and instead use the queue_limits_commit_update_frozen helper to freeze the queue after taking the limits lock. This also removes taking the sysfs lock for the store_limit method as it doesn't protect anything here, but creates even more nesting. Hopefully it will go away from the actual sysfs methods entirely soon. (commit log adapted from a similar patch from Damien Le Moal)
AI Analysis
Technical Summary
CVE-2025-21807 is a vulnerability identified in the Linux kernel related to the handling of device queue limits within the block subsystem, specifically in the sysfs store methods. The vulnerability arises from a potential deadlock condition caused by improper lock ordering when modifying queue limits. In the Linux kernel, the function queue_attr_store() freezes a device queue before invoking the attribute store operation. For attributes that control queue limits, the store operation also locks the queue limits using queue_limits_start_update(). However, certain device drivers, such as the SCSI sd driver, may need to issue commands to hardware to retrieve limit values while holding the queue limits lock. This sequence can lead to an ABBA deadlock if a user attempts to modify a limit (which freezes the device queue) concurrently with the driver revalidating the device queue limits. The deadlock occurs because the queue is frozen before the limits lock is acquired, creating a circular wait condition between the queue freeze and the limits lock. The patch addressing this vulnerability changes the locking order by deferring the queue freeze until after acquiring the limits lock, using the helper queue_limits_commit_update_frozen. Additionally, the patch removes the sysfs lock acquisition for the store_limit method, as it was unnecessary and contributed to complex lock nesting. This fix prevents the deadlock scenario by ensuring proper lock ordering and reducing lock contention. The vulnerability does not have any known exploits in the wild as of the publication date, and no CVSS score has been assigned yet. It affects Linux kernel versions identified by the commit hash 0327ca9d53bfbb0918867313049bba7046900f73. The issue is primarily relevant to systems running Linux kernels with affected versions and using device drivers that interact with block device queue limits, such as SCSI sd drivers.
Potential Impact
The potential impact of CVE-2025-21807 on European organizations primarily involves system availability and operational stability. The deadlock condition can cause device queues to freeze indefinitely, leading to blocked I/O operations on affected storage devices. This can result in degraded system performance, application stalls, or even system hangs if critical storage operations are impacted. For organizations relying heavily on Linux-based infrastructure, especially those using SCSI storage devices or other block devices managed by affected drivers, this vulnerability could disrupt business-critical services, data processing, and storage availability. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact can have significant operational and financial consequences. European enterprises in sectors such as finance, telecommunications, cloud service providers, and public administration, which often deploy Linux servers at scale, may face increased risk of service interruptions if the vulnerability is exploited or triggered inadvertently. The absence of known exploits reduces immediate risk, but the complexity of the issue means that inadvertent deadlocks could occur during routine system management or updates, emphasizing the need for timely patching. Additionally, the vulnerability could complicate incident response and recovery efforts if device queues become unresponsive, potentially increasing downtime and operational costs.
Mitigation Recommendations
To mitigate CVE-2025-21807, European organizations should prioritize updating their Linux kernel to the patched version that includes the fix for the queue freeze and lock ordering issue. Kernel updates should be tested in staging environments to ensure compatibility with existing hardware and drivers, particularly those managing block devices such as SCSI sd drivers. Organizations should audit their Linux systems to identify affected kernel versions and device drivers, focusing on storage subsystems that rely on queue limits. Implementing monitoring solutions that detect abnormal I/O queue freezes or device unresponsiveness can provide early warning signs of deadlock conditions. System administrators should avoid manual modifications to queue limits on production systems until patches are applied, or perform such operations during maintenance windows with appropriate safeguards. Additionally, reviewing and minimizing custom kernel modules or third-party drivers that interact with block device queues can reduce complexity and potential deadlock risks. For environments using containerization or virtualization on Linux hosts, ensuring that the underlying host kernel is patched is critical, as the vulnerability affects the host's block device management. Finally, maintaining up-to-date documentation and operational procedures for handling device queue issues will facilitate faster response and recovery if deadlocks occur.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2025-21807: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: block: fix queue freeze vs limits lock order in sysfs store methods queue_attr_store() always freezes a device queue before calling the attribute store operation. For attributes that control queue limits, the store operation will also lock the queue limits with a call to queue_limits_start_update(). However, some drivers (e.g. SCSI sd) may need to issue commands to a device to obtain limit values from the hardware with the queue limits locked. This creates a potential ABBA deadlock situation if a user attempts to modify a limit (thus freezing the device queue) while the device driver starts a revalidation of the device queue limits. Avoid such deadlock by not freezing the queue before calling the ->store_limit() method in struct queue_sysfs_entry and instead use the queue_limits_commit_update_frozen helper to freeze the queue after taking the limits lock. This also removes taking the sysfs lock for the store_limit method as it doesn't protect anything here, but creates even more nesting. Hopefully it will go away from the actual sysfs methods entirely soon. (commit log adapted from a similar patch from Damien Le Moal)
AI-Powered Analysis
Technical Analysis
CVE-2025-21807 is a vulnerability identified in the Linux kernel related to the handling of device queue limits within the block subsystem, specifically in the sysfs store methods. The vulnerability arises from a potential deadlock condition caused by improper lock ordering when modifying queue limits. In the Linux kernel, the function queue_attr_store() freezes a device queue before invoking the attribute store operation. For attributes that control queue limits, the store operation also locks the queue limits using queue_limits_start_update(). However, certain device drivers, such as the SCSI sd driver, may need to issue commands to hardware to retrieve limit values while holding the queue limits lock. This sequence can lead to an ABBA deadlock if a user attempts to modify a limit (which freezes the device queue) concurrently with the driver revalidating the device queue limits. The deadlock occurs because the queue is frozen before the limits lock is acquired, creating a circular wait condition between the queue freeze and the limits lock. The patch addressing this vulnerability changes the locking order by deferring the queue freeze until after acquiring the limits lock, using the helper queue_limits_commit_update_frozen. Additionally, the patch removes the sysfs lock acquisition for the store_limit method, as it was unnecessary and contributed to complex lock nesting. This fix prevents the deadlock scenario by ensuring proper lock ordering and reducing lock contention. The vulnerability does not have any known exploits in the wild as of the publication date, and no CVSS score has been assigned yet. It affects Linux kernel versions identified by the commit hash 0327ca9d53bfbb0918867313049bba7046900f73. The issue is primarily relevant to systems running Linux kernels with affected versions and using device drivers that interact with block device queue limits, such as SCSI sd drivers.
Potential Impact
The potential impact of CVE-2025-21807 on European organizations primarily involves system availability and operational stability. The deadlock condition can cause device queues to freeze indefinitely, leading to blocked I/O operations on affected storage devices. This can result in degraded system performance, application stalls, or even system hangs if critical storage operations are impacted. For organizations relying heavily on Linux-based infrastructure, especially those using SCSI storage devices or other block devices managed by affected drivers, this vulnerability could disrupt business-critical services, data processing, and storage availability. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact can have significant operational and financial consequences. European enterprises in sectors such as finance, telecommunications, cloud service providers, and public administration, which often deploy Linux servers at scale, may face increased risk of service interruptions if the vulnerability is exploited or triggered inadvertently. The absence of known exploits reduces immediate risk, but the complexity of the issue means that inadvertent deadlocks could occur during routine system management or updates, emphasizing the need for timely patching. Additionally, the vulnerability could complicate incident response and recovery efforts if device queues become unresponsive, potentially increasing downtime and operational costs.
Mitigation Recommendations
To mitigate CVE-2025-21807, European organizations should prioritize updating their Linux kernel to the patched version that includes the fix for the queue freeze and lock ordering issue. Kernel updates should be tested in staging environments to ensure compatibility with existing hardware and drivers, particularly those managing block devices such as SCSI sd drivers. Organizations should audit their Linux systems to identify affected kernel versions and device drivers, focusing on storage subsystems that rely on queue limits. Implementing monitoring solutions that detect abnormal I/O queue freezes or device unresponsiveness can provide early warning signs of deadlock conditions. System administrators should avoid manual modifications to queue limits on production systems until patches are applied, or perform such operations during maintenance windows with appropriate safeguards. Additionally, reviewing and minimizing custom kernel modules or third-party drivers that interact with block device queues can reduce complexity and potential deadlock risks. For environments using containerization or virtualization on Linux hosts, ensuring that the underlying host kernel is patched is critical, as the vulnerability affects the host's block device management. Finally, maintaining up-to-date documentation and operational procedures for handling device queue issues will facilitate faster response and recovery if deadlocks occur.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.772Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9832c4522896dcbe88bf
Added to database: 5/21/2025, 9:09:06 AM
Last enriched: 6/30/2025, 9:25:44 AM
Last updated: 8/12/2025, 5:31:45 PM
Views: 20
Related Threats
Researcher to release exploit for full auth bypass on FortiWeb
HighCVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.