{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-68807","id":"CVE-2025-68807","title":"block: fix race between wbt_enable_default and IO submission","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: fix race between wbt_enable_default and IO submission\n\nWhen wbt_enable_default() is moved out of queue freezing in elevator_change(),\nit can cause the wbt inflight counter to become negative (-1), leading to hung\ntasks in the writeback path. Tasks get stuck in wbt_wait() because the counter\nis in an inconsistent state.\n\nTh","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: fix race between wbt_enable_default and IO submission\n\nWhen wbt_enable_default() is moved out of queue freezing in elevator_change(),\nit can cause the wbt inflight counter to become negative (-1), leading to hung\ntasks in the writeback path. Tasks get stuck in wbt_wait() because the counter\nis in an inconsistent state.\n\nThe issue occurs because wbt_enable_default() could race with IO submission,\nallowing the counter to be decremented before proper initialization. This manifests\nas:\n\n  rq_wait[0]:\n    inflight:             -1\n    has_waiters:        True\n\nrwb_enabled() checks the state, which can be updated exactly between wbt_wait()\n(rq_qos_throttle()) and wbt_track()(rq_qos_track()), then the inflight counter\nwill become negative.\n\nAnd results in hung task warnings like:\n  task:kworker/u24:39 state:D stack:0 pid:14767\n  Call Trace:\n    rq_qos_wait+0xb4/0x150\n    wbt_wait+0xa9/0x100\n    __rq_qos_throttle+0x24/0x40\n    blk_mq_submit_bio+0x672/0x7b0\n    ...\n\nFix this by:\n\n1. Splitting wbt_enable_default() into:\n   - __wbt_enable_default(): Returns true if wbt_init() should be called\n   - wbt_enable_default(): Wrapper for existing callers (no init)\n   - wbt_init_enable_default(): New function that checks and inits WBT\n\n2. Using wbt_init_enable_default() in blk_register_queue() to ensure\n   proper initialization during queue registration\n\n3. Move wbt_init() out of wbt_enable_default() which is only for enabling\n   disabled wbt from bfq and iocost, and wbt_init() isn't needed. Then the\n   original lock warning can be avoided.\n\n4. Removing the ELEVATOR_FLAG_ENABLE_WBT_ON_EXIT flag and its handling\n   code since it's no longer needed\n\nThis ensures WBT is properly initialized before any IO can be submitted,\npreventing the counter from going negative.","published":"2026-01-13T15:29:14.483Z","updated":"2026-10-28T02:30:53.771894510Z","reserved":"2025-12-24T10:30:51.045Z","status":"Deferred","rejected":false,"assigner":"Linux","metric":null,"metrics":[],"rating":"unrated","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"78c271344b6f64ce24c845e54903e09928cf2061","lessThan":"f55201fb3becff6a903fd29f4d1147cc7e91eb0c","status":"affected","versionType":"git"},{"version":"78c271344b6f64ce24c845e54903e09928cf2061","lessThan":"9869d3a6fed381f3b98404e26e1afc75d680cbf9","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","lessThan":"6.16","status":"unaffected","versionType":"semver"},{"version":"6.18.3","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"6.19","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/f55201fb3becff6a903fd29f4d1147cc7e91eb0c","tags":["web"]},{"url":"https://git.kernel.org/stable/c/9869d3a6fed381f3b98404e26e1afc75d680cbf9","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68807.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68807","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00185,"epssPercentile":0.08186,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-68807","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68807","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-68807","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-68807","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}