CVE-2026-98180: drm/msm: RCU-free the scheduler-containing ring and VM objects
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/msm: RCU-free the scheduler-containing ring and VM objects
Both struct msm_ringbuffer and struct msm_gem_vm embed a struct drm_gpu_scheduler. msm_ringbuffer_destroy() and the VM free callback msm_gem_vm_free() call drm_sched_fini() on the embedded scheduler and then free the containing object with plain kfree().
drm_sched_fence_get_timeline_name() returns fence->sched->name, and the scheduler fence keeps a .release callback so it is not ops-detached on signalling. A finished fence exported to userspace (the submit out-fence, or a VM_BIND fence, via sync_file / drm_syncobj) keeps pointing at the embedded scheduler after the ring/VM is freed, so a later get_timeline_name() -- reachable unprivileged through SYNC_IOC_FILE_INFO -- dereferences freed slab memory (KASAN slab-use-after-free read).
Per the dma-fence lifetime contract the exporter must keep the data backing a signalled fence alive for an RCU grace period. Free the scheduler-containing objects with kfree_rcu() instead of kfree().
Patchwork: https://patchwork.freedesktop.org/patch/750234/
The Linux kernel CVE team has assigned CVE-2026-98180 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 1d8a5ca436ee4a28eec14cb813f790f7cdeeee19 and fixed in 6.18.54 with commit d81bf4581903b0cba0698cd4d1c07fc6be21754a Issue introduced in 5.15 with commit 1d8a5ca436ee4a28eec14cb813f790f7cdeeee19 and fixed in 7.2.8 with commit 713abac5c04ccbae67f9ac68c3921845535388e7 Issue introduced in 5.15 with commit 1d8a5ca436ee4a28eec14cb813f790f7cdeeee19 and fixed in 7.3-rc4 with commit 01c8d1f385f788f1bbbbb7687c4386d614281218
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98180
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/msm/msm_gem.h
drivers/gpu/drm/msm/msm_gem_vma.c
drivers/gpu/drm/msm/msm_ringbuffer.c
drivers/gpu/drm/msm/msm_ringbuffer.h
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/d81bf4581903b0cba0698cd4d1c07fc6be21754a https://git.kernel.org/stable/c/713abac5c04ccbae67f9ac68c3921845535388e7 https://git.kernel.org/stable/c/01c8d1f385f788f1bbbbb7687c4386d614281218