cve.bz

CVE-2026-31586 linux linux kernel: Use After Free

7.8 highEPSS 0.1%Fix available

High (7.8) in linux linux kernel. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 3rd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-31586 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-31586?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-31586?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-31586 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.19 and later

Fixed in

ProductRelease lineFixed in
Linux5.105.10.258
Linux5.155.15.209
Linux6.16.1.175
Linux6.66.6.136
Linux6.126.12.83
Linux6.186.18.24
Linux6.196.19.14
Linux7.07.0.1
Linuxlater releases7.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.176-1DEBIAN-CVE-2026-31586
Debian13linux6.12.85-1DEBIAN-CVE-2026-31586
Debian14linux6.19.14-1DEBIAN-CVE-2026-31586
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2026-31586
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2026-31586
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2026-31586
Ubuntu22.04:LTSlinux5.15.0-186.196UBUNTU-CVE-2026-31586 USN-8575-1
Ubuntu22.04:LTSlinux-aws5.15.0-1112.119UBUNTU-CVE-2026-31586 USN-8575-2
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1061.64~22.04.1UBUNTU-CVE-2026-31586 USN-8595-3
Ubuntu22.04:LTSlinux-azure, linux-azure-fde5.15.0-1117.126UBUNTU-CVE-2026-31586 USN-8575-3 USN-8610-1
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1063.71~22.04.1UBUNTU-CVE-2026-31586 USN-8606-1
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1062.69~22.04.1UBUNTU-CVE-2026-31586 USN-8609-1
Ubuntu22.04:LTSlinux-gcp5.15.0-1112.122UBUNTU-CVE-2026-31586 USN-8575-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1064.72~22.04.1UBUNTU-CVE-2026-31586 USN-8567-1
Ubuntu22.04:LTSlinux-gke5.15.0-1108.114UBUNTU-CVE-2026-31586 USN-8575-1
107 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6kernel-default6.4.0-150600.23.112.1SUSE-SU-2026:2195-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.55.1SUSE-SU-2026:2238-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_4121-150400.2.1SUSE-SU-2026:2867-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_4317-150400.2.1SUSE-SU-2026:2920-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_4416-150400.2.1SUSE-SU-2026:2889-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_4514-150400.2.1SUSE-SU-2026:2864-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_4610-150400.2.1SUSE-SU-2026:2910-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_496-150400.2.1SUSE-SU-2026:2932-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_515-150400.2.1SUSE-SU-2026:2937-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_524-150400.2.1SUSE-SU-2026:2888-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_2721-150500.2.2SUSE-SU-2026:2899-1
SUSELinux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_2820-150500.2.2SUSE-SU-2026:2933-1
119 more for SUSE in the JSON and on SUSE's page.
openSUSETumbleweedkernel-source7.0.3-1.1openSUSE-SU-2026:10703-1
Azure Linux3kernel6.6.137.1-1AZL-83858
Alpaquita23linux-lts6.1.175-r0BELL-CVE-2026-31586
Alpaquita25linux-lts6.12.85-r0BELL-CVE-2026-31586
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2026-31586

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A use-after-free flaw in the Linux kernel cgroup writeback and block cgroup interaction can occur when cgwb_release_workfn() drops the last reference to wb->blkcg_css before later passing the same pointer to blkcg_unpin_online(). A local attacker with access to cgroup/writeback lifecycle operations could potentially race cgroup destruction and trigger a kernel crash. The most likely impact is denial of service, while privilege escalation would require additional, unproven heap reuse control.

The bug appears more consistent with a denial-of-service race condition than a reliably exploitable privilege-escalation issue, as it involves a narrow worker-thread race with no obvious attacker-controlled overwrite or reclaim primitive and currently reproduces mainly as a KASAN-detected crash.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelAffected
Red Hat Enterprise Linux 6kernelUnder investigation
Red Hat Enterprise Linux 7kernelAffected
Red Hat Enterprise Linux 7kernel-rtAffected
Red Hat Enterprise Linux 8kernelAffected
Red Hat Enterprise Linux 8kernel-rtAffected
Red Hat Enterprise Linux 9kernelAffected
Red Hat Enterprise Linux 9kernel-rtAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-31586.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-295-16Siemens SIMATIC S7-1500 TM MFP2026-10-13Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON