CVE-2026-139111

blk-iocost: publish hweights as one atomic value

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

blk-iocost: publish hweights as one atomic value

current_hweight() publishes the cache generation and both weights with
separate stores. Refreshers running on different CPUs can interleave
their stores and leave a new generation paired with weights from an older
calculation. The compiler can also reorder the generation store before
the weight stores, so a reader that sees the new generation can accept
stale weights.

A stale weight is not only a reporting artifact. It feeds the cost
calculation and the donation logic, where an inconsistent combination can
lead to a zero divisor in transfer_surpluses().

In addition, the slow path rereads iocg->hweight_active/inuse after
publishing them, so the value it returns can be the one written by another
refresher instead of the locally computed one.

Pack the generation and both weights into a single atomic64_t and publish
them with one atomic write. Readers take one atomic snapshot and return
the local values. Weights are in [1, WEIGHT_ONE]; storing each minus one
preserves the full range in 16 bits and leaves 32 bits for the generation.

The two weight fields remain as the donation workspace used under
ioc->lock. Tracepoints decode the packed cache without refreshing it and
iocost_monitor.py is updated accordingly.

Developed with assistance from Claude Code (Anthropic): the assistant
drafted the packed representation, the helpers and the tracepoint/monitor
changes, and ran the checks listed below. The author reviewed the result
and remains responsible for it.

Analysis

AI-generated

Technical impact

The flaw allows separate stores of the generation and weight values published by blk-iocost, creating a race where a reader can observe a new generation coupled with stale weight values. This inconsistency can make the block device cost calculation divide by zero in transfer_surpluses(), causing a kernel panic and bringing the system down. The violation is a concurrency issue that leads to incorrect system state and availability loss.

Affected Systems

All Linux kernel builds that include the blk-iocost cost monitoring feature are affected. The issue is present in any distribution shipping an unmodified kernel version that contains the legacy separate-hweight publication logic, regardless of the specific version number.

Risk and Exploitability

Exploitation requires two or more concurrent refreshers on different CPUs to interleave their stores, a condition that typically occurs under normal system load. The vulnerability is not listed in the CISA KEV catalog and no CVSS or EPSS scores are available. While the risk of remote exploitation is limited due to the need for local CPU activity, privileged users or malicious software running on the affected host can trigger the race and cause a denial of service by forcing the kernel to execute the vulnerable code path.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the atomic64_t hweight publish change, ensuring that generation and weight values are written atomically.
  • Rebuild the kernel with the patch applied, confirming that the new implementation of blk-iocost is active and that the transfer_surpluses() routine no longer performs division by potentially stale values.
  • If an immediate kernel update is not viable, disable or avoid using the blk-iocost cost monitoring feature in the kernel configuration, or generate minimal I/O workloads to reduce the likelihood of the race occurring.

Generated by OpenCVE AI on November 30, 2026 at 19:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-363
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: blk-iocost: publish hweights as one atomic value current_hweight() publishes the cache generation and both weights with separate stores. Refreshers running on different CPUs can interleave their stores and leave a new generation paired with weights from an older calculation. The compiler can also reorder the generation store before the weight stores, so a reader that sees the new generation can accept stale weights. A stale weight is not only a reporting artifact. It feeds the cost calculation and the donation logic, where an inconsistent combination can lead to a zero divisor in transfer_surpluses(). In addition, the slow path rereads iocg->hweight_active/inuse after publishing them, so the value it returns can be the one written by another refresher instead of the locally computed one. Pack the generation and both weights into a single atomic64_t and publish them with one atomic write. Readers take one atomic snapshot and return the local values. Weights are in [1, WEIGHT_ONE]; storing each minus one preserves the full range in 16 bits and leaves 32 bits for the generation. The two weight fields remain as the donation workspace used under ioc->lock. Tracepoints decode the packed cache without refreshing it and iocost_monitor.py is updated accordingly. Developed with assistance from Claude Code (Anthropic): the assistant drafted the packed representation, the helpers and the tracepoint/monitor changes, and ran the checks listed below. The author reviewed the result and remains responsible for it.
Title blk-iocost: publish hweights as one atomic value
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-363

    Race Condition Enabling Link Following

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:31 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM