{"id":"CVE-2026-139111","state":"PUBLISHED","title":"blk-iocost: publish hweights as one atomic value","description":"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->hweight_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->lock.  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.","publishedAt":"2026-11-30T13:31:41.026Z","updatedAt":"2026-11-30T13:31:41.026Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"b837673eaaf820481843901b8505968c31157189","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"eaa12d1932546a26816865df96afa2dcdc26d3bf","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"da227c9773756e829388a1740f311d2f2d8b0ede","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"0150554a3f38e1850d5964102eb89a720c5fe789","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-iocost.c","include/trace/events/iocost.h","tools/cgroup/iocost_monitor.py"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-iocost.c","include/trace/events/iocost.h","tools/cgroup/iocost_monitor.py"]}],"references":["https://git.kernel.org/stable/c/b837673eaaf820481843901b8505968c31157189","https://git.kernel.org/stable/c/eaa12d1932546a26816865df96afa2dcdc26d3bf","https://git.kernel.org/stable/c/da227c9773756e829388a1740f311d2f2d8b0ede","https://git.kernel.org/stable/c/0150554a3f38e1850d5964102eb89a720c5fe789"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139111.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139111","state":"PUBLISHED","datePublished":"2026-11-30T13:31:41.026Z","dateUpdated":"2026-11-30T13:31:41.026Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.914Z"},"containers":{"cna":{"title":"blk-iocost: publish hweights as one atomic value","descriptions":[{"lang":"en","value":"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->hweight_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->lock.  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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"b837673eaaf820481843901b8505968c31157189","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"eaa12d1932546a26816865df96afa2dcdc26d3bf","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"da227c9773756e829388a1740f311d2f2d8b0ede","versionType":"git"},{"version":"7caa47151ab2e644dd221f741ec7578d9532c9a3","status":"affected","lessThan":"0150554a3f38e1850d5964102eb89a720c5fe789","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-iocost.c","include/trace/events/iocost.h","tools/cgroup/iocost_monitor.py"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-iocost.c","include/trace/events/iocost.h","tools/cgroup/iocost_monitor.py"]}],"references":[{"url":"https://git.kernel.org/stable/c/b837673eaaf820481843901b8505968c31157189"},{"url":"https://git.kernel.org/stable/c/eaa12d1932546a26816865df96afa2dcdc26d3bf"},{"url":"https://git.kernel.org/stable/c/da227c9773756e829388a1740f311d2f2d8b0ede"},{"url":"https://git.kernel.org/stable/c/0150554a3f38e1850d5964102eb89a720c5fe789"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:41.026Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}