Linux Kernel Block Layer I/O Cost QoS Handling Vulnerability

Vulnerability

A vulnerability in the Linux kernel's block layer has been identified, specifically related to the I/O cost quality of service (QoS) management. The issue arises from a change that made the bio_endio() function skip the rq_qos_done_bio() callback for untracked I/O operations. This modification, while preventing a potential kernel oops error, disrupted the proper functioning of the I/O cost subsystem by failing to acknowledge the completion of merged bio operations. As a result, merged bios are incorrectly treated as still in progress, causing significant issues in I/O management and control, particularly under certain workload scenarios.

Impact

The vulnerability leads to improper handling of merged I/O operations, causing them to be incorrectly reported as still in progress. This disruption can interfere with I/O scheduling and management, potentially allowing certain workloads to monopolize I/O resources, thereby degrading performance and responsiveness of other processes.

Reproduction

The vulnerability can be reproduced by configuring a cgroup with I/O cost management enabled, and then running a workload that generates high memory usage while isolating I/O operations. This scenario can be emulated using the 'resctl-bench' tool, which simulates a web server workload under an I/O cost configuration. The resulting I/O latency metrics will show a significant degradation in performance, particularly for write operations, indicating that the merged bios are not being properly processed and completed.

Remediation

The vulnerability has been addressed by introducing a new flag to mark merged bios and ensuring that the rq_qos_done_bio() callback is called for them as well. For consistency, the BIO_TRACKED flag has been renamed to BIO_QOS_THROTTLED. Users should apply the latest patches available in the Linux kernel to mitigate this issue.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.7
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.