CVE-2022-50369

Source
https://cve.org/CVERecord?id=CVE-2022-50369
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50369.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50369
Downstream
Related
Published
2025-09-17T14:56:24.889Z
Modified
2026-03-20T11:47:25.267282Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
drm/vkms: Fix null-ptr-deref in vkms_release()
Details

In the Linux kernel, the following vulnerability has been resolved:

drm/vkms: Fix null-ptr-deref in vkms_release()

A null-ptr-deref is triggered when it tries to destroy the workqueue in vkms->output.composerworkq in vkmsrelease().

KASAN: null-ptr-deref in range [0x0000000000000118-0x000000000000011f] CPU: 5 PID: 17193 Comm: modprobe Not tainted 6.0.0-11331-gd465bff130bf #24 RIP: 0010:destroyworkqueue+0x2f/0x710 ... Call Trace: <TASK> ? vkmsconfigdebugfsinit+0x50/0x50 [vkms] __devmdrmdev_alloc+0x15a/0x1c0 [drm] vkmsinit+0x245/0x1000 [vkms] dooneinitcall+0xd0/0x4f0 doinitmodule+0x1a4/0x680 loadmodule+0x6249/0x7110 _dosysfinitmodule+0x140/0x200 dosyscall64+0x35/0x80 entrySYSCALL64afterhwframe+0x46/0xb0

The reason is that an OOM happened which triggers the destroy of the workqueue, however, the workqueue is alloced in the later process, thus a null-ptr-deref happened. A simple call graph is shown as below:

vkmsinit() vkmscreate() devmdrmdev_alloc() _devmdrmdevalloc() devmdrmdevinit() devmaddactionorreset() devmaddaction() # an error happened devmdrmdevinitrelease() drmdevput() krefput() drmdevrelease() vkmsrelease() destroyworkqueue() # null-ptr-deref happened vkmsmodesetinit() vkmsoutputinit() vkmscrtcinit() # where the workqueue get allocated

Fix this by checking if composerworkq is NULL before passing it to the destroyworkqueue() in vkms_release().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50369.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6c234fe37c57627a5baf96f552afa1fae2b67d4d
Fixed
0b8f390e2251191f1b179cc87f65d54c96565f0d
Fixed
1f9836f95271e7acf016667eee0aeae3386f9645
Fixed
596f1ba3987e601e31a5abf1f75ce1d2635aceac
Fixed
57031c474c3a920ea73afeb5dc352e537f5793ee
Fixed
2fe2a8f40c21161ffe7653cc234e7934db5b7cc5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50369.json"