VDB

CVE-2026-31586

CVE-2026-31586 PUBLISHED CVSS 7.8 HIGH

mm: blk-cgroup: fix use-after-free in cgwb_release_workfn()

Reported by linux · Published April 24, 2026

In the Linux kernel, the following vulnerability has been resolved: mm: blk-cgroup: fix use-after-free in cgwb_release_workfn() cgwb_release_workfn() calls css_put(wb->blkcg_css) and then later accesses wb->blkcg_css again via blkcg_unpin_online(). If css_put() drops the last reference, the blkcg can be freed asynchronously (css_free_rwork_fn -> blkcg_css_free -> kfree) before blkcg_unpin_online() dereferences the pointer to access blkcg->online_pin, resulting in a use-after-free: BUG: KASAN: slab-use-after-free in blkcg_unpin_online (./include/linux/instrumented.h:112 ./include/linux/atomic/atomic-instrumented.h:400 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 block/blk-cgroup.c:1367) Write of size 4 at addr ff11000117aa6160 by task kworker/71:1/531 Workqueue: cgwb_release cgwb_release_workfn Call Trace: <TASK> blkcg_unpin_online (./include/linux/instrumented.h:112 ./include/linux/atomic/atomic-instrumented.h:400 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 block/blk-cgroup.c:1367) cgwb_release_workfn (mm/backing-dev.c:629) process_scheduled_works (kernel/workqueue.c:3278 kernel/workqueue.c:3385) Freed by task 1016: kfree (./include/linux/kasan.h:235 mm/slub.c:2689 mm/slub.c:6246 mm/slub.c:6561) css_free_rwork_fn (kernel/cgroup/cgroup.c:5542) process_scheduled_works (kernel/workqueue.c:3302 kernel/workqueue.c:3385) ** Stack based on commit 66672af7a095 ("Add linux-next specific files for 20260410") I am seeing this crash sporadically in Meta fleet across multiple kernel versions. A full reproducer is available at: https://github.com/leitao/debug/blob/main/reproducers/repro_blkcg_uaf.sh (The race window is narrow. To make it easily reproducible, inject a msleep(100) between css_put() and blkcg_unpin_online() in cgwb_release_workfn(). With that delay and a KASAN-enabled kernel, the reproducer triggers the splat reliably in less than a second.) Fix this by moving blkcg_unpin_online() before css_put(), so the cgwb's CSS reference keeps the blkcg alive while blkcg_unpin_online() accesses it.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux-vmware-6.12Chainguard6.12.85-r0
kernel6.12-tools-develAmazon Linux1:6.12.83-113.160.amzn2023
perfAmazon Linux1:6.1.175-219.357.amzn2023
bpftool6.18Amazon Linux1:6.18.25-55.108.amzn2023
kernel6.18Amazon Linux1:6.18.25-55.108.amzn2023
python3-perf6.12Amazon Linux1:6.12.83-113.160.amzn2023
kernel-livepatch-6.18.25-55.108Amazon Linux1:1.0-0.amzn2023
kernel-tools-develAmazon Linux1:6.1.175-219.357.amzn2023
kernel6.18-toolsAmazon Linux1:6.18.25-55.108.amzn2023
linux-qemu-6.18Chainguard6.18.31-r0
linux-azure-6.18Chainguard6.18.31-r0

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux59b57717fff8b562825d9d25e0180ad7e8048ca9, 59b57717fff8b562825d9d25e0180ad7e8048ca9, 59b57717fff8b562825d9d25e0180ad7e8048ca9
LinuxLinux4.19, 0, 5.10.258
chainguardlinux-vmware-6.120
amazon:2023kernel6.12-tools-devel0
amazon:2023perf0
amazon:2023bpftool6.180
amazon:2023kernel6.180
amazon:2023python3-perf6.120
amazon:2023kernel-livepatch-6.18.25-55.1080
amazon:2023kernel-tools-devel0
amazon:2023kernel6.18-tools0
chainguardlinux-qemu-6.180
chainguardlinux-azure-6.180
amazon:2023kernel-tools0
amazon:2023kernel6.18-headers0
chainguardlinux-vmware-6.180
chainguardlinux-aws-6.180
chainguardlinux-gcp-6.180
LinuxLinux7.1, 6.18.24, 6.19.14
amazon:2023kernel6.18-devel0

…and 26 more

Timeline

  • Apr 24, 2026 CVE Published
  • Apr 24, 2026 Security Advisory (102 in total, the first dated here)
  • Apr 27, 2026 CVE Updated
  • May 18, 2026 EPSS Score (28 in total, the first dated here)
  • Jul 18, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (97 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31586
vulnetix vdb fixes CVE-2026-31586

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31586/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›