{"id":"CVE-2026-139111","summary":"blk-iocost: publish hweights as one atomic value","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nblk-iocost: publish hweights as one atomic value\n\ncurrent_hweight() publishes the cache generation and both weights with\nseparate stores.  Refreshers running on different CPUs can interleave\ntheir stores and leave a new generation paired with weights from an older\ncalculation.  The compiler can also reorder the generation store before\nthe weight stores, so a reader that sees the new generation can accept\nstale weights.\n\nA stale weight is not only a reporting artifact.  It feeds the cost\ncalculation and the donation logic, where an inconsistent combination can\nlead to a zero divisor in transfer_surpluses().\n\nIn addition, the slow path rereads iocg-\u003ehweight_active/inuse after\npublishing them, so the value it returns can be the one written by another\nrefresher instead of the locally computed one.\n\nPack the generation and both weights into a single atomic64_t and publish\nthem with one atomic write.  Readers take one atomic snapshot and return\nthe local values.  Weights are in [1, WEIGHT_ONE]; storing each minus one\npreserves the full range in 16 bits and leaves 32 bits for the generation.\n\nThe two weight fields remain as the donation workspace used under\nioc-\u003elock.  Tracepoints decode the packed cache without refreshing it and\niocost_monitor.py is updated accordingly.\n\nDeveloped with assistance from Claude Code (Anthropic): the assistant\ndrafted the packed representation, the helpers and the tracepoint/monitor\nchanges, and ran the checks listed below.  The author reviewed the result\nand remains responsible for it.","modified":"2026-11-30T15:02:23.465080466Z","published":"2026-11-30T13:31:41.026Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139111.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0150554a3f38e1850d5964102eb89a720c5fe789"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b837673eaaf820481843901b8505968c31157189"},{"type":"WEB","url":"https://git.kernel.org/stable/c/da227c9773756e829388a1740f311d2f2d8b0ede"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eaa12d1932546a26816865df96afa2dcdc26d3bf"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139111.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139111"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7caa47151ab2e644dd221f741ec7578d9532c9a3"},{"fixed":"b837673eaaf820481843901b8505968c31157189"},{"fixed":"eaa12d1932546a26816865df96afa2dcdc26d3bf"},{"fixed":"da227c9773756e829388a1740f311d2f2d8b0ede"},{"fixed":"0150554a3f38e1850d5964102eb89a720c5fe789"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139111.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.4.0"},{"fixed":"6.12.119"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139111.json"}}],"schema_version":"1.9.2"}