CVE-2025-68807

Source
https://cve.org/CVERecord?id=CVE-2025-68807
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68807.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-68807
Downstream
Published
2026-01-13T15:29:14.483Z
Modified
2026-02-09T19:34:32.283928Z
Summary
block: fix race between wbt_enable_default and IO submission
Details

In the Linux kernel, the following vulnerability has been resolved:

block: fix race between wbtenabledefault and IO submission

When wbtenabledefault() is moved out of queue freezing in elevatorchange(), it can cause the wbt inflight counter to become negative (-1), leading to hung tasks in the writeback path. Tasks get stuck in wbtwait() because the counter is in an inconsistent state.

The issue occurs because wbtenabledefault() could race with IO submission, allowing the counter to be decremented before proper initialization. This manifests as:

rqwait[0]: inflight: -1 haswaiters: True

rwbenabled() checks the state, which can be updated exactly between wbtwait() (rqqosthrottle()) and wbttrack()(rqqos_track()), then the inflight counter will become negative.

And results in hung task warnings like: task:kworker/u24:39 state:D stack:0 pid:14767 Call Trace: rqqoswait+0xb4/0x150 wbt_wait+0xa9/0x100 _rqqosthrottle+0x24/0x40 blkmqsubmitbio+0x672/0x7b0 ...

Fix this by:

  1. Splitting wbtenabledefault() into:

    • _wbtenabledefault(): Returns true if wbtinit() should be called
    • wbtenabledefault(): Wrapper for existing callers (no init)
    • wbtinitenable_default(): New function that checks and inits WBT
  2. Using wbtinitenabledefault() in blkregister_queue() to ensure proper initialization during queue registration

  3. Move wbtinit() out of wbtenabledefault() which is only for enabling disabled wbt from bfq and iocost, and wbtinit() isn't needed. Then the original lock warning can be avoided.

  4. Removing the ELEVATORFLAGENABLEWBTON_EXIT flag and its handling code since it's no longer needed

This ensures WBT is properly initialized before any IO can be submitted, preventing the counter from going negative.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68807.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
78c271344b6f64ce24c845e54903e09928cf2061
Fixed
f55201fb3becff6a903fd29f4d1147cc7e91eb0c
Fixed
9869d3a6fed381f3b98404e26e1afc75d680cbf9

Affected versions

v6.*
v6.15
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.18
v6.18-rc1
v6.18-rc2
v6.18-rc3
v6.18-rc4
v6.18-rc5
v6.18-rc6
v6.18-rc7
v6.18.1
v6.18.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68807.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.16.0
Fixed
6.18.3

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68807.json"